(self)
| 302 | ) |
| 303 | |
| 304 | def test_record(self) -> None: |
| 305 | with pytest.warns(UserWarning) as record: |
| 306 | warnings.warn("user", UserWarning) |
| 307 | |
| 308 | assert len(record) == 1 |
| 309 | assert str(record[0].message) == "user" |
| 310 | |
| 311 | def test_record_only(self) -> None: |
| 312 | with pytest.warns() as record: |