testing: python 3.10 fix

This commit is contained in:
Ran Benita 2020-10-25 01:08:12 +02:00
parent 65e6e39b76
commit d9ac2efbcd
1 changed files with 2 additions and 3 deletions

View File

@ -336,10 +336,9 @@ class BaseFunctionalTests:
assert reps[2].failed assert reps[2].failed
assert reps[2].when == "teardown" assert reps[2].when == "teardown"
assert reps[2].longrepr.reprcrash.message in ( assert reps[2].longrepr.reprcrash.message in (
# python3 error
"TypeError: teardown_method() missing 2 required positional arguments: 'y' and 'z'", "TypeError: teardown_method() missing 2 required positional arguments: 'y' and 'z'",
# python2 error # Python >= 3.10
"TypeError: teardown_method() takes exactly 4 arguments (2 given)", "TypeError: TestClass.teardown_method() missing 2 required positional arguments: 'y' and 'z'",
) )
def test_failure_in_setup_function_ignores_custom_repr(self, testdir) -> None: def test_failure_in_setup_function_ignores_custom_repr(self, testdir) -> None: