Test for issue https://github.com/pytest-dev/pytest/issues/1609 (#1609) Ignore duplicate directories.
(pytester: Pytester)
| 1361 | |
| 1362 | |
| 1363 | def test_skip_duplicates_by_default(pytester: Pytester) -> None: |
| 1364 | """Test for issue https://github.com/pytest-dev/pytest/issues/1609 (#1609) |
| 1365 | |
| 1366 | Ignore duplicate directories. |
| 1367 | """ |
| 1368 | a = pytester.mkdir("a") |
| 1369 | fh = a.joinpath("test_a.py") |
| 1370 | fh.write_text( |
| 1371 | textwrap.dedent( |
| 1372 | """\ |
| 1373 | import pytest |
| 1374 | def test_real(): |
| 1375 | pass |
| 1376 | """ |
| 1377 | ) |
| 1378 | ) |
| 1379 | result = pytester.runpytest(str(a), str(a)) |
| 1380 | result.stdout.fnmatch_lines(["*collected 1 item*"]) |
| 1381 | |
| 1382 | |
| 1383 | def test_keep_duplicates(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected