(self, pytester: Pytester)
| 162 | assert result.ret == 1 |
| 163 | |
| 164 | def test_nested_import_error(self, pytester: Pytester) -> None: |
| 165 | p = pytester.makepyfile( |
| 166 | """ |
| 167 | import import_fails |
| 168 | def test_this(): |
| 169 | assert import_fails.a == 1 |
| 170 | """ |
| 171 | ) |
| 172 | pytester.makepyfile(import_fails="import does_not_work") |
| 173 | result = pytester.runpytest(p) |
| 174 | result.stdout.fnmatch_lines( |
| 175 | [ |
| 176 | "ImportError while importing test module*", |
| 177 | "*No module named *does_not_work*", |
| 178 | ] |
| 179 | ) |
| 180 | assert result.ret == 2 |
| 181 | |
| 182 | def test_not_collectable_arguments(self, pytester: Pytester) -> None: |
| 183 | p1 = pytester.makepyfile("") |
nothing calls this directly
no test coverage detected