(pytester: Pytester)
| 1479 | |
| 1480 | |
| 1481 | def test_tbstyle_short(pytester: Pytester) -> None: |
| 1482 | p = pytester.makepyfile( |
| 1483 | """ |
| 1484 | import pytest |
| 1485 | |
| 1486 | @pytest.fixture |
| 1487 | def arg(request): |
| 1488 | return 42 |
| 1489 | def test_opt(arg): |
| 1490 | x = 0 |
| 1491 | assert x |
| 1492 | """ |
| 1493 | ) |
| 1494 | result = pytester.runpytest("--tb=short") |
| 1495 | s = result.stdout.str() |
| 1496 | assert "arg = 42" not in s |
| 1497 | assert "x = 0" not in s |
| 1498 | result.stdout.fnmatch_lines([f"*{p.name}:8*", " assert x", "E assert*"]) |
| 1499 | result = pytester.runpytest() |
| 1500 | s = result.stdout.str() |
| 1501 | assert "x = 0" in s |
| 1502 | assert "assert x" in s |
| 1503 | |
| 1504 | |
| 1505 | def test_traceconfig(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected