Fix other tests with same regexp issue
@@ -34,6 +34,18 @@ class ValidatorsTests(unittest.TestCase):
def foo(list_a, list_b):
pass
+ if sys.version[0] == '2':
+ with self.assertRaisesRegexp(
+ TypeError,
+ 'Expected non-empty argument for parameter list_b',
+ ):
+ foo([1], [])
+ with self.assertRaisesRegexp(
+ TypeError,
+ 'Expected non-empty argument for parameter list_a',
+ ):
+ foo([], [1])
+ else:
with self.assertRaisesRegex(
TypeError,
'Expected non-empty argument for parameter list_b',
