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

Method __exit__

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

Source from the content-addressed store, hash-verified

1993 return super().__enter__()
1994
1995 def __exit__(self, *exc_info):
1996 super().__exit__(*exc_info)
1997 for mod in self.modules:
1998 if hasattr(mod, '__warningregistry__'):
1999 mod.__warningregistry__.clear()
2000 if mod in self._warnreg_copies:
2001 mod.__warningregistry__.update(self._warnreg_copies[mod])
2002
2003
2004class 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