(pytester: Pytester)
| 108 | |
| 109 | |
| 110 | def test_setUpModule_failing_no_teardown(pytester: Pytester) -> None: |
| 111 | testpath = pytester.makepyfile( |
| 112 | """ |
| 113 | values = [] |
| 114 | |
| 115 | def setUpModule(): |
| 116 | 0/0 |
| 117 | |
| 118 | def tearDownModule(): |
| 119 | values.append(1) |
| 120 | |
| 121 | def test_hello(): |
| 122 | pass |
| 123 | """ |
| 124 | ) |
| 125 | reprec = pytester.inline_run(testpath) |
| 126 | reprec.assertoutcome(passed=0, failed=1) |
| 127 | call = reprec.getcalls("pytest_runtest_setup")[0] |
| 128 | assert not call.item.module.values |
| 129 | |
| 130 | |
| 131 | def test_new_instances(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected