We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1990617 commit 3745430Copy full SHA for 3745430
tests/test_kwargs_and_defaults.py
@@ -34,8 +34,10 @@ def test_named_arguments(msg):
34
with pytest.raises(TypeError) as excinfo:
35
# noinspection PyArgumentList
36
kw_func2(x=5, y=10, z=12)
37
- assert excinfo.match(
38
- r'(?s)^kw_func2\(\): incompatible.*Invoked with: kwargs: ((x=5|y=10|z=12)(, |$))' + '{3}$')
+ if hasattr(excinfo, "match"): # (pytest <3.0 doesn't have `.match()`)
+ assert excinfo.match(
39
+ r'(?s)^kw_func2\(\): incompatible.*Invoked with: kwargs: ((x=5|y=10|z=12)(, |$))' +
40
+ '{3}$')
41
42
assert kw_func4() == "{13 17}"
43
assert kw_func4(myList=[1, 2, 3]) == "{1 2 3}"
0 commit comments