Fix format string in assert_in()/assert_not_in()

This commit is contained in:
Jakub Wilk
2016-05-14 12:28:40 +02:00
parent 12b83372ac
commit 74b15cc64c

View File

@@ -109,10 +109,10 @@ try:
except ImportError:
def assert_in(x, thing, msg=''):
if x not in thing:
assert False, msg or '%r is not in %r%r' % (x, thing)
assert False, msg or '%r is not in %r' % (x, thing)
def assert_not_in(x, thing, msg=''):
if x in thing:
assert False, msg or '%r is in %r%r' % (x, thing)
assert False, msg or '%r is in %r' % (x, thing)
def skip_if(condition, msg=None):