(pytester: Pytester)
| 129 | |
| 130 | |
| 131 | def test_new_instances(pytester: Pytester) -> None: |
| 132 | testpath = pytester.makepyfile( |
| 133 | """ |
| 134 | import unittest |
| 135 | class MyTestCase(unittest.TestCase): |
| 136 | def test_func1(self): |
| 137 | self.x = 2 |
| 138 | def test_func2(self): |
| 139 | assert not hasattr(self, 'x') |
| 140 | """ |
| 141 | ) |
| 142 | reprec = pytester.inline_run(testpath) |
| 143 | reprec.assertoutcome(passed=2) |
| 144 | |
| 145 | |
| 146 | def test_function_item_obj_is_instance(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected