(module_name: str)
| 216 | |
| 217 | |
| 218 | def silent_import_module(module_name: str) -> types.ModuleType: |
| 219 | with open(os.devnull, "w") as devnull: |
| 220 | with warnings.catch_warnings(), redirect_stdout(devnull), redirect_stderr(devnull): |
| 221 | warnings.simplefilter("ignore") |
| 222 | runtime = importlib.import_module(module_name) |
| 223 | # Also run the equivalent of `from module import *` |
| 224 | # This could have the additional effect of loading not-yet-loaded submodules |
| 225 | # mentioned in __all__ |
| 226 | __import__(module_name, fromlist=["*"]) |
| 227 | return runtime |
| 228 | |
| 229 | |
| 230 | def test_module(module_name: str) -> Iterator[Error]: |
no outgoing calls
no test coverage detected
searching dependent graphs…