(self, pytester: Pytester)
| 41 | # assert colreports[1].report.failed |
| 42 | |
| 43 | def test_nested_import_error(self, pytester: Pytester) -> None: |
| 44 | tfile = pytester.makepyfile( |
| 45 | """ |
| 46 | import import_fails |
| 47 | def test_this(): |
| 48 | assert import_fails.a == 1 |
| 49 | """, |
| 50 | import_fails=""" |
| 51 | import does_not_work |
| 52 | a = 1 |
| 53 | """, |
| 54 | ) |
| 55 | reprec = pytester.inline_run(tfile) |
| 56 | values = reprec.getfailedcollections() |
| 57 | assert len(values) == 1 |
| 58 | out = str(values[0].longrepr) |
| 59 | assert out.find("does_not_work") != -1 |
| 60 | |
| 61 | def test_raises_output(self, pytester: Pytester) -> None: |
| 62 | reprec = pytester.inline_runsource( |
nothing calls this directly
no test coverage detected