diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-06-29 08:41:22 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-03-29 00:41:12 +0200 |
commit | ac466c7cc38a9d5e0cbbb83ec783ccb9d8a899ee (patch) | |
tree | 167e335407711c50fb1e4b49f7b784b144e2c7e1 /python | |
parent | 7427812dd67e6e17c56b53cf15b7dae6e58190e1 (diff) | |
download | samba-ac466c7cc38a9d5e0cbbb83ec783ccb9d8a899ee.tar.gz |
python/samba/tests: add fallbacks for assert{Less,Greater}[Equal]()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 24ea9175f41e391ce48d21dedf0e79fb16f7352e)
Diffstat (limited to 'python')
-rw-r--r-- | python/samba/tests/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index 3e7094fe067..82aa72dedfc 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -79,6 +79,18 @@ class TestCase(unittest.TestCase): def assertIsNone(self, a, msg=None): self.assertTrue(a is None, msg) + def assertGreater(self, a, b, msg=None): + self.assertTrue(a > b, msg) + + def assertGreaterEqual(self, a, b, msg=None): + self.assertTrue(a >= b, msg) + + def assertLess(self, a, b, msg=None): + self.assertTrue(a < b, msg) + + def assertLessEqual(self, a, b, msg=None): + self.assertTrue(a <= b, msg) + def addCleanup(self, fn, *args, **kwargs): self._cleanups = getattr(self, "_cleanups", []) + [ (fn, args, kwargs)] |