/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_from_template.py (1103B)
from numpy.distutils.from_template import process_str from numpy.testing import assert_equal pyf_src = """ python module foo <_rd=real,double precision> interface subroutine foosub(tol) <_rd>, intent(in,out) :: tol end subroutine foosub end interface end python module foo """ expected_pyf = """ python module foo interface subroutine sfoosub(tol) real, intent(in,out) :: tol end subroutine sfoosub subroutine dfoosub(tol) double precision, intent(in,out) :: tol end subroutine dfoosub end interface end python module foo """ def normalize_whitespace(s): """ Remove leading and trailing whitespace, and convert internal stretches of whitespace to a single space. """ return ' '.join(s.split()) def test_from_template(): """Regression test for gh-10712.""" pyf = process_str(pyf_src) normalized_pyf = normalize_whitespace(pyf) normalized_expected_pyf = normalize_whitespace(expected_pyf) assert_equal(normalized_pyf, normalized_expected_pyf)