Skip to content

Commit

Permalink
test: assert fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Myp3a committed Dec 5, 2024
1 parent ae683a9 commit a8e0aba
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions testing/acceptance_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1593,9 +1593,8 @@ def test_get_exception_on_teardown_failure(pytester: Pytester) -> None:
import sys
import pytest
def pytest_exception_interact(node, call, report):
sys.stderr.write("{}".format(node.teardown_exceptions))
sys.stderr.write("teardown_exceptions: `{}`".format(node.teardown_exceptions))
import pytest
@pytest.fixture
def mylist():
yield
Expand All @@ -1608,5 +1607,5 @@ def test_func(mylist):
)
result = pytester.runpytest()
assert result.ret == ExitCode.TESTS_FAILED
assert "AssertionError(111)" in result.stderr.str()
result.stdout.fnmatch_lines(["*1 error*"])
assert "teardown_exceptions: `[AssertionError(111)]`" in result.stderr.str()
result.assert_outcomes(passed=1, errors=1)

0 comments on commit a8e0aba

Please sign in to comment.