(self)
| 242 | int("asdf") |
| 243 | |
| 244 | def test_raises_exception_looks_iterable(self): |
| 245 | class Meta(type): |
| 246 | def __getitem__(self, item): |
| 247 | return 1 / 0 |
| 248 | |
| 249 | def __len__(self): |
| 250 | return 1 |
| 251 | |
| 252 | class ClassLooksIterableException(Exception, metaclass=Meta): |
| 253 | pass |
| 254 | |
| 255 | with pytest.raises( |
| 256 | Failed, |
| 257 | match=r"DID NOT RAISE <class 'raises(\..*)*ClassLooksIterableException'>", |
| 258 | ): |
| 259 | pytest.raises(ClassLooksIterableException, lambda: None) |
| 260 | |
| 261 | def test_raises_with_raising_dunder_class(self) -> None: |
| 262 | """Test current behavior with regard to exceptions via __class__ (#4284).""" |
nothing calls this directly
no outgoing calls
no test coverage detected