Skip to content

Commit d9ac2ef

Browse files
committed
testing: python 3.10 fix
1 parent 65e6e39 commit d9ac2ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

testing/test_runner.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,9 @@ def test_method(self):
336336
assert reps[2].failed
337337
assert reps[2].when == "teardown"
338338
assert reps[2].longrepr.reprcrash.message in (
339-
# python3 error
340339
"TypeError: teardown_method() missing 2 required positional arguments: 'y' and 'z'",
341-
# python2 error
342-
"TypeError: teardown_method() takes exactly 4 arguments (2 given)",
340+
# Python >= 3.10
341+
"TypeError: TestClass.teardown_method() missing 2 required positional arguments: 'y' and 'z'",
343342
)
344343

345344
def test_failure_in_setup_function_ignores_custom_repr(self, testdir) -> None:

0 commit comments

Comments
 (0)