(self, pytester: Pytester, option)
| 1363 | ) |
| 1364 | |
| 1365 | def test_maxfailures(self, pytester: Pytester, option) -> None: |
| 1366 | pytester.makepyfile( |
| 1367 | """ |
| 1368 | def test_1(): |
| 1369 | assert 0 |
| 1370 | def test_2(): |
| 1371 | assert 0 |
| 1372 | def test_3(): |
| 1373 | assert 0 |
| 1374 | """ |
| 1375 | ) |
| 1376 | result = pytester.runpytest("--maxfail=2", *option.args) |
| 1377 | result.stdout.fnmatch_lines( |
| 1378 | [ |
| 1379 | "*def test_1():*", |
| 1380 | "*def test_2():*", |
| 1381 | "*! stopping after 2 failures !*", |
| 1382 | "*2 failed*", |
| 1383 | ] |
| 1384 | ) |
| 1385 | |
| 1386 | def test_maxfailures_with_interrupted(self, pytester: Pytester) -> None: |
| 1387 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected