$38 GRAYBYTE WORDPRESS FILE MANAGER $53

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.85
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_fcompiler.py
from numpy.testing import assert_
import numpy.distutils.fcompiler

customizable_flags = [
    ('f77', 'F77FLAGS'),
    ('f90', 'F90FLAGS'),
    ('free', 'FREEFLAGS'),
    ('arch', 'FARCH'),
    ('debug', 'FDEBUG'),
    ('flags', 'FFLAGS'),
    ('linker_so', 'LDFLAGS'),
]


def test_fcompiler_flags(monkeypatch):
    monkeypatch.setenv('NPY_DISTUTILS_APPEND_FLAGS', '0')
    fc = numpy.distutils.fcompiler.new_fcompiler(compiler='none')
    flag_vars = fc.flag_vars.clone(lambda *args, **kwargs: None)

    for opt, envvar in customizable_flags:
        new_flag = '-dummy-{}-flag'.format(opt)
        prev_flags = getattr(flag_vars, opt)

        monkeypatch.setenv(envvar, new_flag)
        new_flags = getattr(flag_vars, opt)

        monkeypatch.delenv(envvar)
        assert_(new_flags == [new_flag])

    monkeypatch.setenv('NPY_DISTUTILS_APPEND_FLAGS', '1')

    for opt, envvar in customizable_flags:
        new_flag = '-dummy-{}-flag'.format(opt)
        prev_flags = getattr(flag_vars, opt)
        monkeypatch.setenv(envvar, new_flag)
        new_flags = getattr(flag_vars, opt)

        monkeypatch.delenv(envvar)
        if prev_flags is None:
            assert_(new_flags == [new_flag])
        else:
            assert_(new_flags == prev_flags + [new_flag])



Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
11 Feb 2026 9.30 AM
root / root
0755
__pycache__
--
11 Feb 2026 9.30 AM
root / root
0755
__init__.py
0 KB
20 Jan 2026 1.01 PM
root / root
0644
test_build_ext.py
2.704 KB
20 Jan 2026 1.01 PM
root / root
0644
test_ccompiler_opt.py
28.104 KB
20 Jan 2026 1.01 PM
root / root
0644
test_ccompiler_opt_conf.py
6.198 KB
20 Jan 2026 1.01 PM
root / root
0644
test_exec_command.py
7.222 KB
20 Jan 2026 1.01 PM
root / root
0644
test_fcompiler.py
1.247 KB
20 Jan 2026 1.01 PM
root / root
0644
test_fcompiler_gnu.py
2.086 KB
20 Jan 2026 1.01 PM
root / root
0644
test_fcompiler_intel.py
1.033 KB
20 Jan 2026 1.01 PM
root / root
0644
test_fcompiler_nagfor.py
1.076 KB
20 Jan 2026 1.01 PM
root / root
0644
test_from_template.py
1.077 KB
20 Jan 2026 1.01 PM
root / root
0644
test_log.py
0.848 KB
20 Jan 2026 1.01 PM
root / root
0644
test_mingw32ccompiler.py
1.571 KB
20 Jan 2026 1.01 PM
root / root
0644
test_misc_util.py
3.143 KB
20 Jan 2026 1.01 PM
root / root
0644
test_npy_pkg_config.py
2.497 KB
20 Jan 2026 1.01 PM
root / root
0644
test_shell_utils.py
2.064 KB
20 Jan 2026 1.01 PM
root / root
0644
test_system_info.py
10.741 KB
20 Jan 2026 1.01 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF