(pytester: Pytester)
| 1322 | |
| 1323 | |
| 1324 | def test_tbstyle_short(pytester: Pytester) -> None: |
| 1325 | p = pytester.makepyfile( |
| 1326 | """ |
| 1327 | import pytest |
| 1328 | |
| 1329 | @pytest.fixture |
| 1330 | def arg(request): |
| 1331 | return 42 |
| 1332 | def test_opt(arg): |
| 1333 | x = 0 |
| 1334 | assert x |
| 1335 | """ |
| 1336 | ) |
| 1337 | result = pytester.runpytest("--tb=short") |
| 1338 | s = result.stdout.str() |
| 1339 | assert "arg = 42" not in s |
| 1340 | assert "x = 0" not in s |
| 1341 | result.stdout.fnmatch_lines(["*%s:8*" % p.name, " assert x", "E assert*"]) |
| 1342 | result = pytester.runpytest() |
| 1343 | s = result.stdout.str() |
| 1344 | assert "x = 0" in s |
| 1345 | assert "assert x" in s |
| 1346 | |
| 1347 | |
| 1348 | def test_traceconfig(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected