summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-08-03 12:05:04 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-08-03 14:13:49 -0300
commit83c2720bcaf235927a04a12d82b7c0a70711316d (patch)
tree85b8bb51e6316f23d3390d7720b1adef39ea4930 /tests
parent001fa6fdcc415f5fbe25774e2391290440e6c21b (diff)
downloadshiboken-83c2720bcaf235927a04a12d82b7c0a70711316d.tar.gz
shiboken-83c2720bcaf235927a04a12d82b7c0a70711316d.tar.xz
shiboken-83c2720bcaf235927a04a12d82b7c0a70711316d.zip
Modified tests using Point and assertNotEqual to use assert_(not a == b).
This is due to Point intentionally not having a != operator and assertNotEqual implementation using the __ne__ operator on Python 2.7. Reviewed by Luciano Wolf <luciano.wolf@openbossa.org> Reviewed by Renato Ara├║jo <renato.filho@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/samplebinding/class_fields_test.py2
-rw-r--r--tests/samplebinding/point_test.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/samplebinding/class_fields_test.py b/tests/samplebinding/class_fields_test.py
index 576e8d62..f0791e1d 100644
--- a/tests/samplebinding/class_fields_test.py
+++ b/tests/samplebinding/class_fields_test.py
@@ -64,7 +64,7 @@ class TestAccessingCppFields(unittest.TestCase):
new_value = Point(-10, 537)
d.valueTypeField = new_value
self.assertEqual(d.valueTypeField, new_value)
- self.assertNotEqual(d.valueTypeField, old_value)
+ self.assert_(not d.valueTypeField == old_value)
# attribution with invalid type
self.assertRaises(TypeError, lambda : setattr(d, 'valueTypeField', 123))
diff --git a/tests/samplebinding/point_test.py b/tests/samplebinding/point_test.py
index a461703f..d1ae3eed 100644
--- a/tests/samplebinding/point_test.py
+++ b/tests/samplebinding/point_test.py
@@ -67,7 +67,7 @@ class PointTest(unittest.TestCase):
pt2 = pt1.copy()
self.assertEqual(pt1, pt2)
pt2 += pt1
- self.assertNotEqual(pt1, pt2)
+ self.assert_(not pt1 == pt2)
def testReturnConstPointer(self):
'''Point returns a const pointer for itself.'''