SILENT KILLERPanel

Current Path: > > opt > cloudlinux > venv > lib > python3.11 > site-packages > numpy > 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/tests/

NameTypeSizeLast ModifiedActions
__pycache__ Directory - -
__init__.py File 0 bytes April 17 2025 13:10:58.
test__all__.py File 221 bytes April 17 2025 13:10:58.
test_ctypeslib.py File 12290 bytes April 17 2025 13:10:58.
test_lazyloading.py File 1162 bytes April 17 2025 13:10:58.
test_matlib.py File 1852 bytes April 17 2025 13:10:58.
test_numpy_config.py File 1241 bytes April 17 2025 13:10:58.
test_numpy_version.py File 1575 bytes April 17 2025 13:10:58.
test_public_api.py File 16872 bytes April 17 2025 13:10:58.
test_reloading.py File 2354 bytes April 17 2025 13:10:58.
test_scripts.py File 1645 bytes April 17 2025 13:10:58.
test_warnings.py File 2280 bytes April 17 2025 13:10:58.

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

"""
Check the numpy config is valid.
"""
import numpy as np
import pytest
from unittest.mock import Mock, patch

pytestmark = pytest.mark.skipif(
    not hasattr(np.__config__, "_built_with_meson"),
    reason="Requires Meson builds",
)


class TestNumPyConfigs:
    REQUIRED_CONFIG_KEYS = [
        "Compilers",
        "Machine Information",
        "Python Information",
    ]

    @patch("numpy.__config__._check_pyyaml")
    def test_pyyaml_not_found(self, mock_yaml_importer):
        mock_yaml_importer.side_effect = ModuleNotFoundError()
        with pytest.warns(UserWarning):
            np.show_config()

    def test_dict_mode(self):
        config = np.show_config(mode="dicts")

        assert isinstance(config, dict)
        assert all([key in config for key in self.REQUIRED_CONFIG_KEYS]), (
            "Required key missing,"
            " see index of `False` with `REQUIRED_CONFIG_KEYS`"
        )

    def test_invalid_mode(self):
        with pytest.raises(AttributeError):
            np.show_config(mode="foo")

    def test_warn_to_add_tests(self):
        assert len(np.__config__.DisplayModes) == 2, (
            "New mode detected,"
            " please add UT if applicable and increment this count"
        )

SILENT KILLER Tool