$41 GRAYBYTE WORDPRESS FILE MANAGER $44

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/distutils/tests/

HOME
Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/numpy/distutils/tests//test_from_template.py
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)

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
14 Aug 2025 9.24 PM
root / root
0755
__pycache__
--
14 Aug 2025 9.24 PM
root / root
0755
__init__.py
0 KB
17 Apr 2025 8.10 PM
root / root
0644
test_build_ext.py
2.704 KB
17 Apr 2025 8.10 PM
root / root
0644
test_ccompiler_opt.py
28.104 KB
17 Apr 2025 8.10 PM
root / root
0644
test_ccompiler_opt_conf.py
6.198 KB
17 Apr 2025 8.10 PM
root / root
0644
test_exec_command.py
7.222 KB
17 Apr 2025 8.10 PM
root / root
0644
test_fcompiler.py
1.247 KB
17 Apr 2025 8.10 PM
root / root
0644
test_fcompiler_gnu.py
2.086 KB
17 Apr 2025 8.10 PM
root / root
0644
test_fcompiler_intel.py
1.033 KB
17 Apr 2025 8.10 PM
root / root
0644
test_fcompiler_nagfor.py
1.076 KB
17 Apr 2025 8.10 PM
root / root
0644
test_from_template.py
1.077 KB
17 Apr 2025 8.10 PM
root / root
0644
test_log.py
0.848 KB
17 Apr 2025 8.10 PM
root / root
0644
test_mingw32ccompiler.py
1.571 KB
17 Apr 2025 8.10 PM
root / root
0644
test_misc_util.py
3.143 KB
17 Apr 2025 8.10 PM
root / root
0644
test_npy_pkg_config.py
2.497 KB
17 Apr 2025 8.10 PM
root / root
0644
test_shell_utils.py
2.064 KB
17 Apr 2025 8.10 PM
root / root
0644
test_system_info.py
10.741 KB
17 Apr 2025 8.10 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF