Without the pythonpath setting, the module should not be found.
(pytester: Pytester, file_structure)
| 62 | |
| 63 | |
| 64 | def test_module_not_found(pytester: Pytester, file_structure) -> None: |
| 65 | """Without the pythonpath setting, the module should not be found.""" |
| 66 | pytester.makefile(".ini", pytest="[pytest]\n") |
| 67 | result = pytester.runpytest("test_foo.py") |
| 68 | assert result.ret == pytest.ExitCode.INTERRUPTED |
| 69 | result.assert_outcomes(errors=1) |
| 70 | expected_error = "E ModuleNotFoundError: No module named 'foo'" |
| 71 | result.stdout.fnmatch_lines([expected_error]) |
| 72 | |
| 73 | |
| 74 | def test_no_ini(pytester: Pytester, file_structure) -> None: |
nothing calls this directly
no test coverage detected