(self, pytester: Pytester)
| 79 | pytest.raises(ImportError, lambda: modcol.obj) |
| 80 | |
| 81 | def test_invalid_test_module_name(self, pytester: Pytester) -> None: |
| 82 | a = pytester.mkdir("a") |
| 83 | a.joinpath("test_one.part1.py").touch() |
| 84 | result = pytester.runpytest() |
| 85 | result.stdout.fnmatch_lines( |
| 86 | [ |
| 87 | "ImportError while importing test module*test_one.part1*", |
| 88 | "Hint: make sure your test modules/packages have valid Python names.", |
| 89 | ] |
| 90 | ) |
| 91 | |
| 92 | @pytest.mark.parametrize("verbose", [0, 1, 2]) |
| 93 | def test_show_traceback_import_error( |
nothing calls this directly
no test coverage detected