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
commit32ee759a4241220a1aa5b13b23ca99505fd067e8 (patch)
treed648710ca186e20110ef75e0c32458e0fe84f197 /test/test_testing.py
parentabc4e824f617d3450607ee4d9aff314b6962cf93 (diff)
downloadpython-coveragepy-32ee759a4241220a1aa5b13b23ca99505fd067e8.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 2346967..9943b65 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`."""