MCPcopy Create free account
hub / github.com/numpy/numpy / _get_fresh_mod

Function _get_fresh_mod

numpy/testing/tests/test_utils.py:1290–1299  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1288
1289
1290def _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
1302def test_clear_and_catch_warnings():

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected