(self)
| 567 | |
| 568 | @unittest.expectedFailure # TODO: RUSTPYTHON; + /Users/al03219714/Projects/RustPython1/crates/pylib/Lib/test/test_warnings/__init__.py |
| 569 | def test_stacklevel_import(self): |
| 570 | # Issue #24305: With stacklevel=2, module-level warnings should work. |
| 571 | import_helper.unload('test.test_warnings.data.import_warning') |
| 572 | with warnings_state(self.module): |
| 573 | with self.module.catch_warnings(record=True) as w: |
| 574 | self.module.simplefilter('always') |
| 575 | import test.test_warnings.data.import_warning # noqa: F401 |
| 576 | self.assertEqual(len(w), 1) |
| 577 | self.assertEqual(w[0].filename, __file__) |
| 578 | |
| 579 | def test_skip_file_prefixes(self): |
| 580 | with warnings_state(self.module): |
nothing calls this directly
no test coverage detected