Use different assert for Python 2 v 3
@@ -16,6 +16,14 @@ class ValidatorsTests(unittest.TestCase):
foo([1], [])
except Exception:
self.fail()
+
+ if sys.version[0] == 2:
+ 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_a',
