PATH: //opt/cloudlinux/venv/lib/python3.11/site-packages/setuptools/tests
FILE_BARU
CREATE
FOLDER_BARU
MKDIR
UPLOAD_FILE
GO
[ .. KEMBALI ]
📄 __init__.py
↓
X
📁 __pycache__/
X
📁 compat/
X
📁 config/
X
📄 contexts.py
↓
X
📄 environment.py
↓
X
📄 fixtures.py
↓
X
📁 indexes/
X
📁 integration/
X
📄 mod_with_constant.py
↓
X
📄 namespaces.py
↓
X
📄 script-with-bom.py
↓
X
📄 server.py
↓
X
📄 test_archive_util.py
↓
X
📄 test_bdist_deprecations.py
↓
X
📄 test_bdist_egg.py
↓
X
📄 test_bdist_wheel.py
↓
X
📄 test_build.py
↓
X
📄 test_build_clib.py
↓
X
📄 test_build_ext.py
↓
X
📄 test_build_meta.py
↓
X
📄 test_build_py.py
↓
X
📄 test_config_discovery.py
↓
X
📄 test_core_metadata.py
↓
X
📄 test_depends.py
↓
X
📄 test_develop.py
↓
X
📄 test_dist.py
↓
X
📄 test_dist_info.py
↓
X
📄 test_distutils_adoption.py
↓
X
📄 test_easy_install.py
↓
X
📄 test_editable_install.py
↓
X
📄 test_egg_info.py
↓
X
📄 test_extern.py
↓
X
📄 test_find_packages.py
↓
X
📄 test_find_py_modules.py
↓
X
📄 test_glob.py
↓
X
📄 test_install_scripts.py
↓
X
📄 test_logging.py
↓
X
📄 test_manifest.py
↓
X
📄 test_namespaces.py
↓
X
📄 test_packageindex.py
↓
X
📄 test_sandbox.py
↓
X
📄 test_sdist.py
↓
X
📄 test_setopt.py
↓
X
📄 test_setuptools.py
↓
X
📄 test_shutil_wrapper.py
↓
X
📄 test_unicode_utils.py
↓
X
📄 test_virtualenv.py
↓
X
📄 test_warnings.py
↓
X
📄 test_wheel.py
↓
X
📄 test_windows_wrappers.py
↓
X
📄 text.py
↓
X
📄 textwrap.py
↓
X
SAVING...
BERHASIL DIUBAH!
EDITING: test_logging.py
import functools import inspect import logging import sys import pytest IS_PYPY = '__pypy__' in sys.builtin_module_names setup_py = """\ from setuptools import setup setup( name="test_logging", version="0.0" ) """ @pytest.mark.parametrize( ('flag', 'expected_level'), [("--dry-run", "INFO"), ("--verbose", "DEBUG")] ) def test_verbosity_level(tmp_path, monkeypatch, flag, expected_level): """Make sure the correct verbosity level is set (issue #3038)""" import setuptools # noqa: F401 # import setuptools to monkeypatch distutils import distutils # <- load distutils after all the patches take place logger = logging.Logger(__name__) monkeypatch.setattr(logging, "root", logger) unset_log_level = logger.getEffectiveLevel() assert logging.getLevelName(unset_log_level) == "NOTSET" setup_script = tmp_path / "setup.py" setup_script.write_text(setup_py, encoding="utf-8") dist = distutils.core.run_setup(setup_script, stop_after="init") dist.script_args = [flag, "sdist"] dist.parse_command_line() # <- where the log level is set log_level = logger.getEffectiveLevel() log_level_name = logging.getLevelName(log_level) assert log_level_name == expected_level def flaky_on_pypy(func): @functools.wraps(func) def _func(): try: func() except AssertionError: # pragma: no cover if IS_PYPY: msg = "Flaky monkeypatch on PyPy (#4124)" pytest.xfail(f"{msg}. Original discussion in #3707, #3709.") raise return _func @flaky_on_pypy def test_patching_does_not_cause_problems(): # Ensure `dist.log` is only patched if necessary import _distutils_hack import setuptools.logging from distutils import dist setuptools.logging.configure() if _distutils_hack.enabled(): # Modern logging infra, no problematic patching. assert dist.__file__ is None or "setuptools" in dist.__file__ assert isinstance(dist.log, logging.Logger) else: assert inspect.ismodule(dist.log)
SIMPAN PERUBAHAN