Add missing assertIn, assertNotIn methods on 2.6
This commit is contained in:
parent
62e7275bdf
commit
8f73c552a9
1 changed files with 7 additions and 0 deletions
|
|
@ -154,6 +154,13 @@ class FlaskTestCase(unittest.TestCase):
|
||||||
def assert_not_in(self, x, y):
|
def assert_not_in(self, x, y):
|
||||||
self.assertNotIn(x, y)
|
self.assertNotIn(x, y)
|
||||||
|
|
||||||
|
if sys.version_info[:2] == (2, 6):
|
||||||
|
def assertIn(self, x, y):
|
||||||
|
assert x in y, "%r unexpectedly not in %r" % (x, y)
|
||||||
|
|
||||||
|
def assertNotIn(self, x, y):
|
||||||
|
assert x not in y, "%r unexpectedly in %r" % (x, y)
|
||||||
|
|
||||||
|
|
||||||
class _ExceptionCatcher(object):
|
class _ExceptionCatcher(object):
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue