SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib > > python3.11 > site-packages > numpy > distutils > tests


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/cloudlinux/venv/lib//python3.11/site-packages/numpy/distutils/tests

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 0 bytes April 17 2025 13:10:58.
test_build_ext.py File 2769 bytes April 17 2025 13:10:58.
test_ccompiler_opt.py File 28778 bytes April 17 2025 13:10:58.
test_ccompiler_opt_conf.py File 6347 bytes April 17 2025 13:10:58.
test_exec_command.py File 7395 bytes April 17 2025 13:10:58.
test_fcompiler.py File 1277 bytes April 17 2025 13:10:58.
test_fcompiler_gnu.py File 2136 bytes April 17 2025 13:10:58.
test_fcompiler_intel.py File 1058 bytes April 17 2025 13:10:58.
test_fcompiler_nagfor.py File 1102 bytes April 17 2025 13:10:58.
test_from_template.py File 1103 bytes April 17 2025 13:10:58.
test_log.py File 868 bytes April 17 2025 13:10:58.
test_mingw32ccompiler.py File 1609 bytes April 17 2025 13:10:58.
test_misc_util.py File 3218 bytes April 17 2025 13:10:58.
test_npy_pkg_config.py File 2557 bytes April 17 2025 13:10:58.
test_shell_utils.py File 2114 bytes April 17 2025 13:10:58.
test_system_info.py File 10999 bytes April 17 2025 13:10:58.

Reading File: //opt/cloudlinux/venv/lib//python3.11/site-packages/numpy/distutils/tests/test_misc_util.py

from os.path import join, sep, dirname

from numpy.distutils.misc_util import (
    appendpath, minrelpath, gpaths, get_shared_lib_extension, get_info
    )
from numpy.testing import (
    assert_, assert_equal
    )

ajoin = lambda *paths: join(*((sep,)+paths))

class TestAppendpath:

    def test_1(self):
        assert_equal(appendpath('prefix', 'name'), join('prefix', 'name'))
        assert_equal(appendpath('/prefix', 'name'), ajoin('prefix', 'name'))
        assert_equal(appendpath('/prefix', '/name'), ajoin('prefix', 'name'))
        assert_equal(appendpath('prefix', '/name'), join('prefix', 'name'))

    def test_2(self):
        assert_equal(appendpath('prefix/sub', 'name'),
                     join('prefix', 'sub', 'name'))
        assert_equal(appendpath('prefix/sub', 'sup/name'),
                     join('prefix', 'sub', 'sup', 'name'))
        assert_equal(appendpath('/prefix/sub', '/prefix/name'),
                     ajoin('prefix', 'sub', 'name'))

    def test_3(self):
        assert_equal(appendpath('/prefix/sub', '/prefix/sup/name'),
                     ajoin('prefix', 'sub', 'sup', 'name'))
        assert_equal(appendpath('/prefix/sub/sub2', '/prefix/sup/sup2/name'),
                     ajoin('prefix', 'sub', 'sub2', 'sup', 'sup2', 'name'))
        assert_equal(appendpath('/prefix/sub/sub2', '/prefix/sub/sup/name'),
                     ajoin('prefix', 'sub', 'sub2', 'sup', 'name'))

class TestMinrelpath:

    def test_1(self):
        n = lambda path: path.replace('/', sep)
        assert_equal(minrelpath(n('aa/bb')), n('aa/bb'))
        assert_equal(minrelpath('..'), '..')
        assert_equal(minrelpath(n('aa/..')), '')
        assert_equal(minrelpath(n('aa/../bb')), 'bb')
        assert_equal(minrelpath(n('aa/bb/..')), 'aa')
        assert_equal(minrelpath(n('aa/bb/../..')), '')
        assert_equal(minrelpath(n('aa/bb/../cc/../dd')), n('aa/dd'))
        assert_equal(minrelpath(n('.././..')), n('../..'))
        assert_equal(minrelpath(n('aa/bb/.././../dd')), n('dd'))

class TestGpaths:

    def test_gpaths(self):
        local_path = minrelpath(join(dirname(__file__), '..'))
        ls = gpaths('command/*.py', local_path)
        assert_(join(local_path, 'command', 'build_src.py') in ls, repr(ls))
        f = gpaths('system_info.py', local_path)
        assert_(join(local_path, 'system_info.py') == f[0], repr(f))

class TestSharedExtension:

    def test_get_shared_lib_extension(self):
        import sys
        ext = get_shared_lib_extension(is_python_ext=False)
        if sys.platform.startswith('linux'):
            assert_equal(ext, '.so')
        elif sys.platform.startswith('gnukfreebsd'):
            assert_equal(ext, '.so')
        elif sys.platform.startswith('darwin'):
            assert_equal(ext, '.dylib')
        elif sys.platform.startswith('win'):
            assert_equal(ext, '.dll')
        # just check for no crash
        assert_(get_shared_lib_extension(is_python_ext=True))


def test_installed_npymath_ini():
    # Regression test for gh-7707.  If npymath.ini wasn't installed, then this
    # will give an error.
    info = get_info('npymath')

    assert isinstance(info, dict)
    assert "define_macros" in info

SILENT KILLER Tool