diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-12 11:29:51 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-12 11:29:51 -0500 |
commit | eb6d290b8a4b089cd4d71364d38cf702bcb9289b (patch) | |
tree | 74cc26a9c681c82934b3f17059aceeb4fc44fa50 /test/backunittest.py | |
parent | 46140346e2dbacebddfa007cae793f3e2e3fadc1 (diff) | |
download | python-coveragepy-git-eb6d290b8a4b089cd4d71364d38cf702bcb9289b.tar.gz |
Add assertGreater to our arsenal.
Diffstat (limited to 'test/backunittest.py')
-rw-r--r-- | test/backunittest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/backunittest.py b/test/backunittest.py index 3723dea4..30da78eb 100644 --- a/test/backunittest.py +++ b/test/backunittest.py @@ -43,6 +43,13 @@ class TestCase(unittest.TestCase): msg = msg or ('%r found in %r' % (member, container)) self.fail(msg) + if _need('assertGreater'): + def assertGreater(self, a, b, msg=None): + """Assert that `a` is greater than `b`.""" + if not a > b: + msg = msg or ('%r not greater than %r' % (a, b)) + self.fail(msg) + if _need('assertRaisesRegexp'): def assertRaisesRegexp(self, excClass, regexp, callobj, *args, **kw): """ Just like unittest.TestCase.assertRaises, |