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

Function test_clear_and_catch_warnings_inherit

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

Source from the content-addressed store, hash-verified

1546
1547
1548def test_clear_and_catch_warnings_inherit():
1549 # Test can subclass and add default modules
1550 my_mod = _get_fresh_mod()
1551 with my_cacw():
1552 warnings.simplefilter('ignore')
1553 warnings.warn('Some warning')
1554 assert_equal(my_mod.__warningregistry__, {})
1555
1556
1557@pytest.mark.skipif(not HAS_REFCOUNT, reason="Python lacks refcounts")

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
_get_fresh_modFunction · 0.85
my_cacwClass · 0.85
warnMethod · 0.80

Tested by

no test coverage detected