(pytester: Pytester)
| 1295 | |
| 1296 | |
| 1297 | def test_collect_pkg_init_only(pytester: Pytester) -> None: |
| 1298 | subdir = pytester.mkdir("sub") |
| 1299 | init = subdir.joinpath("__init__.py") |
| 1300 | init.write_text("def test_init(): pass") |
| 1301 | |
| 1302 | result = pytester.runpytest(str(init)) |
| 1303 | result.stdout.fnmatch_lines(["*no tests ran in*"]) |
| 1304 | |
| 1305 | result = pytester.runpytest("-v", "-o", "python_files=*.py", str(init)) |
| 1306 | result.stdout.fnmatch_lines(["sub/__init__.py::test_init PASSED*", "*1 passed in*"]) |
| 1307 | |
| 1308 | |
| 1309 | @pytest.mark.parametrize("use_pkg", (True, False)) |
nothing calls this directly
no test coverage detected