diff options
author | Dan Wandschneider <daniel.wandschneider@schrodinger.com> | 2016-06-08 19:51:55 -0400 |
---|---|---|
committer | Dan Wandschneider <daniel.wandschneider@schrodinger.com> | 2016-06-08 19:51:55 -0400 |
commit | 362457abb88da3f0a4746c36fe7d675e75686e67 (patch) | |
tree | 53593b76285c973402da525cd7f616d81013e03b /coverage/backunittest.py | |
parent | 1a8d01fd13babfb7c92534e739fd9659b231f1b0 (diff) | |
download | python-coveragepy-362457abb88da3f0a4746c36fe7d675e75686e67.tar.gz |
Use caoverage.py's canonical backwards compatibility infrastructure in new test.
Diffstat (limited to 'coverage/backunittest.py')
-rw-r--r-- | coverage/backunittest.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/coverage/backunittest.py b/coverage/backunittest.py index 09574cc..29fea86 100644 --- a/coverage/backunittest.py +++ b/coverage/backunittest.py @@ -40,3 +40,8 @@ class TestCase(unittest.TestCase): if not unittest_has('assertRegex'): def assertRegex(self, *args, **kwargs): return self.assertRegexpMatches(*args, **kwargs) + + if not unittest_has('assertNotIn'): + def assertNotIn(self, needle, haystack): + self.assertTrue(needle not in haystack) + |