()
| 1288 | |
| 1289 | |
| 1290 | def _get_fresh_mod(): |
| 1291 | # Get this module, with warning registry empty |
| 1292 | my_mod = sys.modules[__name__] |
| 1293 | try: |
| 1294 | my_mod.__warningregistry__.clear() |
| 1295 | except AttributeError: |
| 1296 | # will not have a __warningregistry__ unless warning has been |
| 1297 | # raised in the module at some point |
| 1298 | pass |
| 1299 | return my_mod |
| 1300 | |
| 1301 | |
| 1302 | def test_clear_and_catch_warnings(): |
no test coverage detected