[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2024-04-26 14:43:10 +00:00
parent 4e13a5fe3f
commit e209a3db15
1 changed files with 29 additions and 21 deletions

View File

@ -1516,18 +1516,22 @@ def test_class_cleanups_failure_in_setup(pytester: Pytester) -> None:
pass
"""
)
result = pytester.runpytest('-s', testpath)
result = pytester.runpytest("-s", testpath)
result.assert_outcomes(passed=0, errors=1)
result.stderr.fnmatch_lines([
'class cleanup error (1 of 2):',
'Exception: fail 1',
'class cleanup error (2 of 2):',
'Exception: fail 2',
])
result.stdout.fnmatch_lines([
'* ERROR at setup of MyTestCase.test *',
'E * Exception: fail 0',
])
result.stderr.fnmatch_lines(
[
"class cleanup error (1 of 2):",
"Exception: fail 1",
"class cleanup error (2 of 2):",
"Exception: fail 2",
]
)
result.stdout.fnmatch_lines(
[
"* ERROR at setup of MyTestCase.test *",
"E * Exception: fail 0",
]
)
def test_class_cleanups_failure_in_teardown(pytester: Pytester) -> None:
@ -1545,17 +1549,21 @@ def test_class_cleanups_failure_in_teardown(pytester: Pytester) -> None:
pass
"""
)
result = pytester.runpytest('-s', testpath)
result = pytester.runpytest("-s", testpath)
result.assert_outcomes(passed=1, errors=1)
result.stderr.fnmatch_lines([
'class cleanup error (1 of 2):',
'Traceback *',
'Exception: fail 1',
])
result.stdout.fnmatch_lines([
'* ERROR at teardown of MyTestCase.test *',
'E * Exception: fail 2',
])
result.stderr.fnmatch_lines(
[
"class cleanup error (1 of 2):",
"Traceback *",
"Exception: fail 1",
]
)
result.stdout.fnmatch_lines(
[
"* ERROR at teardown of MyTestCase.test *",
"E * Exception: fail 2",
]
)
def test_traceback_pruning(pytester: Pytester) -> None: