OXIESEC PANEL
- Current Dir:
/
/
usr
/
local
/
lib
/
python3.6
/
dist-packages
/
numpy
/
distutils
/
tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 05:59:26 AM
rwxr-xr-x
📄
__init__.py
0 bytes
10/28/2024 05:59:24 AM
rw-r--r--
📁
__pycache__
-
10/28/2024 05:59:26 AM
rwxr-xr-x
📄
test_exec_command.py
7.13 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_fcompiler.py
1.25 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_fcompiler_gnu.py
2.09 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_fcompiler_intel.py
1.03 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_fcompiler_nagfor.py
1.08 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_from_template.py
1.08 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_mingw32ccompiler.py
1.57 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_misc_util.py
3.14 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_npy_pkg_config.py
2.5 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_shell_utils.py
1.91 KB
10/28/2024 05:59:24 AM
rw-r--r--
📄
test_system_info.py
9.48 KB
10/28/2024 05:59:24 AM
rw-r--r--
Editing: test_from_template.py
Close
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 <s,d>foosub(tol) <_rd>, intent(in,out) :: tol end subroutine <s,d>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)