(self, pytester: Pytester)
| 160 | ) |
| 161 | |
| 162 | def test_class_with_new_warning(self, pytester: Pytester) -> None: |
| 163 | pytester.makepyfile( |
| 164 | """ |
| 165 | class TestClass1(object): |
| 166 | def __new__(self): |
| 167 | pass |
| 168 | """ |
| 169 | ) |
| 170 | result = pytester.runpytest() |
| 171 | result.stdout.fnmatch_lines( |
| 172 | [ |
| 173 | "*cannot collect test class 'TestClass1' because it has " |
| 174 | "a __new__ constructor (from: test_class_with_new_warning.py)" |
| 175 | ] |
| 176 | ) |
| 177 | |
| 178 | def test_class_subclassobject(self, pytester: Pytester) -> None: |
| 179 | pytester.getmodulecol( |
nothing calls this directly
no test coverage detected