From 743058bbaf63df4e1dd32e565210eee39019fd1e Mon Sep 17 00:00:00 2001 From: Dan Wandschneider Date: Wed, 8 Jun 2016 19:51:55 -0400 Subject: Use caoverage.py's canonical backwards compatibility infrastructure in new test. --- coverage/backunittest.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'coverage/backunittest.py') diff --git a/coverage/backunittest.py b/coverage/backunittest.py index 09574ccb..29fea86f 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) + -- cgit v1.2.1