diff options
author | Anthony Sottile <asottile@umich.edu> | 2022-05-30 17:01:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 17:01:16 -0400 |
commit | f736615f32a4bab27c9efeb5b8f8c31702efc4ab (patch) | |
tree | 58c3796a9deeab90def99daaee17a57c3c10b52f | |
parent | 5959216f67837f3ddf5b959c21e097c7a3758d48 (diff) | |
download | pyflakes-f736615f32a4bab27c9efeb5b8f8c31702efc4ab.tar.gz |
remove backported unittest methods (#705)
-rw-r--r-- | pyflakes/test/harness.py | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/pyflakes/test/harness.py b/pyflakes/test/harness.py index b20ac79..1cdb809 100644 --- a/pyflakes/test/harness.py +++ b/pyflakes/test/harness.py @@ -35,38 +35,3 @@ expected outputs: but got: %s''' % (input, expectedOutputs, '\n'.join([str(o) for o in w.messages]))) return w - - if not hasattr(unittest.TestCase, 'assertIs'): - - def assertIs(self, expr1, expr2, msg=None): - if expr1 is not expr2: - self.fail(msg or '%r is not %r' % (expr1, expr2)) - - if not hasattr(unittest.TestCase, 'assertIsInstance'): - - def assertIsInstance(self, obj, cls, msg=None): - """Same as self.assertTrue(isinstance(obj, cls)).""" - if not isinstance(obj, cls): - self.fail(msg or '%r is not an instance of %r' % (obj, cls)) - - if not hasattr(unittest.TestCase, 'assertNotIsInstance'): - - def assertNotIsInstance(self, obj, cls, msg=None): - """Same as self.assertFalse(isinstance(obj, cls)).""" - if isinstance(obj, cls): - self.fail(msg or '%r is an instance of %r' % (obj, cls)) - - if not hasattr(unittest.TestCase, 'assertIn'): - - def assertIn(self, member, container, msg=None): - """Just like self.assertTrue(a in b).""" - if member not in container: - self.fail(msg or '%r not found in %r' % (member, container)) - - if not hasattr(unittest.TestCase, 'assertNotIn'): - - def assertNotIn(self, member, container, msg=None): - """Just like self.assertTrue(a not in b).""" - if member in container: - self.fail(msg or - '%r unexpectedly found in %r' % (member, container)) |