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

Method __exit__

numpy/testing/_private/utils.py:2282–2288  ·  view source on GitHub ↗
(self, *exc_info)

Source from the content-addressed store, hash-verified

2280 return super().__enter__()
2281
2282 def __exit__(self, *exc_info):
2283 super().__exit__(*exc_info)
2284 for mod in self.modules:
2285 if hasattr(mod, '__warningregistry__'):
2286 mod.__warningregistry__.clear()
2287 if mod in self._warnreg_copies:
2288 mod.__warningregistry__.update(self._warnreg_copies[mod])
2289
2290
2291class suppress_warnings:

Callers

nothing calls this directly

Calls 3

clearMethod · 0.80
updateMethod · 0.80
__exit__Method · 0.45

Tested by

no test coverage detected