Skip to content

Commit f736615

Browse files
authored
remove backported unittest methods (#705)
1 parent 5959216 commit f736615

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

pyflakes/test/harness.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -35,38 +35,3 @@ def flakes(self, input, *expectedOutputs, **kw):
3535
but got:
3636
%s''' % (input, expectedOutputs, '\n'.join([str(o) for o in w.messages])))
3737
return w
38-
39-
if not hasattr(unittest.TestCase, 'assertIs'):
40-
41-
def assertIs(self, expr1, expr2, msg=None):
42-
if expr1 is not expr2:
43-
self.fail(msg or '%r is not %r' % (expr1, expr2))
44-
45-
if not hasattr(unittest.TestCase, 'assertIsInstance'):
46-
47-
def assertIsInstance(self, obj, cls, msg=None):
48-
"""Same as self.assertTrue(isinstance(obj, cls))."""
49-
if not isinstance(obj, cls):
50-
self.fail(msg or '%r is not an instance of %r' % (obj, cls))
51-
52-
if not hasattr(unittest.TestCase, 'assertNotIsInstance'):
53-
54-
def assertNotIsInstance(self, obj, cls, msg=None):
55-
"""Same as self.assertFalse(isinstance(obj, cls))."""
56-
if isinstance(obj, cls):
57-
self.fail(msg or '%r is an instance of %r' % (obj, cls))
58-
59-
if not hasattr(unittest.TestCase, 'assertIn'):
60-
61-
def assertIn(self, member, container, msg=None):
62-
"""Just like self.assertTrue(a in b)."""
63-
if member not in container:
64-
self.fail(msg or '%r not found in %r' % (member, container))
65-
66-
if not hasattr(unittest.TestCase, 'assertNotIn'):
67-
68-
def assertNotIn(self, member, container, msg=None):
69-
"""Just like self.assertTrue(a not in b)."""
70-
if member in container:
71-
self.fail(msg or
72-
'%r unexpectedly found in %r' % (member, container))

0 commit comments

Comments
 (0)