summaryrefslogtreecommitdiff
path: root/test/test_testing.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-12 11:29:51 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-12 11:29:51 -0500
commiteb6d290b8a4b089cd4d71364d38cf702bcb9289b (patch)
tree74cc26a9c681c82934b3f17059aceeb4fc44fa50 /test/test_testing.py
parent46140346e2dbacebddfa007cae793f3e2e3fadc1 (diff)
downloadpython-coveragepy-git-eb6d290b8a4b089cd4d71364d38cf702bcb9289b.tar.gz
Add assertGreater to our arsenal.
Diffstat (limited to 'test/test_testing.py')
-rw-r--r--test/test_testing.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_testing.py b/test/test_testing.py
index 23469672..9943b65c 100644
--- a/test/test_testing.py
+++ b/test/test_testing.py
@@ -114,6 +114,14 @@ class TestingTest(TestCase):
self.assertNotIn("abc", ["x", "xabc"])
self.assertNotIn("abc", {'x':'abc'})
+ def test_assert_greater(self):
+ self.assertGreater(10, 9)
+ self.assertGreater("xyz", "abc")
+ self.assertRaises(AssertionError, self.assertGreater, 9, 10)
+ self.assertRaises(AssertionError, self.assertGreater, 10, 10)
+ self.assertRaises(AssertionError, self.assertGreater, "abc", "xyz")
+ self.assertRaises(AssertionError, self.assertGreater, "xyz", "xyz")
+
class CoverageTestTest(CoverageTest):
"""Test the methods in `CoverageTest`."""