MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_tbstyle_native_setup_error

Function test_tbstyle_native_setup_error

testing/test_terminal.py:1582–1597  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1580
1581
1582def test_tbstyle_native_setup_error(pytester: Pytester) -> None:
1583 pytester.makepyfile(
1584 """
1585 import pytest
1586 @pytest.fixture
1587 def setup_error_fixture():
1588 raise Exception("error in exception")
1589
1590 def test_error_fixture(setup_error_fixture):
1591 pass
1592 """
1593 )
1594 result = pytester.runpytest("--tb=native")
1595 result.stdout.fnmatch_lines(
1596 ['*File *test_tbstyle_native_setup_error.py", line *, in setup_error_fixture*']
1597 )
1598
1599
1600def test_terminal_summary(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected