/opt/imh-python/lib/python3.9/site-packages/numpy/distutils/tests
NameSizeModeActions
__pycache__/-0755rm
test_build_ext.py27690644editdlrm
test_ccompiler_opt.py287780644editdlrm
test_ccompiler_opt_conf.py63470644editdlrm
test_exec_command.py73950644editdlrm
test_fcompiler.py12770644editdlrm
test_fcompiler_gnu.py21360644editdlrm
test_fcompiler_intel.py10580644editdlrm
test_fcompiler_nagfor.py11020644editdlrm
test_from_template.py11030644editdlrm
test_log.py8680644editdlrm
test_mingw32ccompiler.py16090644editdlrm
test_misc_util.py32180644editdlrm
test_npy_pkg_config.py25570644editdlrm
test_shell_utils.py21140644editdlrm
test_system_info.py114050644editdlrm
__init__.py00644editdlrm
Edit: /opt/imh-python/lib/python3.9/site-packages/numpy/distutils/tests/test_log.py (868B)
import io import re from contextlib import redirect_stdout import pytest from numpy.distutils import log def setup_module(): f = io.StringIO() # changing verbosity also logs here, capture that with redirect_stdout(f): log.set_verbosity(2, force=True) # i.e. DEBUG def teardown_module(): log.set_verbosity(0, force=True) # the default r_ansi = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])") @pytest.mark.parametrize("func_name", ["error", "warn", "info", "debug"]) def test_log_prefix(func_name): func = getattr(log, func_name) msg = f"{func_name} message" f = io.StringIO() with redirect_stdout(f): func(msg) out = f.getvalue() assert out # sanity check clean_out = r_ansi.sub("", out) line = next(line for line in clean_out.splitlines()) assert line == f"{func_name.upper()}: {msg}"