summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/arch/vmpa.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/arch/vmpa.py b/tests/arch/vmpa.py
index def61ea..09c3d9d 100755
--- a/tests/arch/vmpa.py
+++ b/tests/arch/vmpa.py
@@ -33,3 +33,29 @@ class TestVmpa(ChrysalideTestCase):
self.assertEqual(a, b)
self.assertEqual(a, c)
+
+
+ def testCompareWrong(self):
+ """Verify unhandled comparisons with VMPA."""
+
+ a = vmpa()
+
+ with self.assertRaisesRegex(Exception, 'Unable to cast object as VMPA.'):
+
+ self.assertLess(a, 'b')
+
+
+ def testCompareFair(self):
+ """Verify right VMPA comparisons."""
+
+ a = vmpa(0)
+ b = vmpa()
+
+ self.assertLess(a, b)
+
+ self.assertGreater(b, a)
+
+ a = vmpa()
+ b = vmpa()
+
+ self.assertEqual(a, b)