/
usr
/
lib
/
imh-ultrastack-common
/
venv
/
lib
/
python3.13
/
site-packages
/
setuptools
/
tests
/
/usr/lib/imh-ultrastack-common/venv/lib/python3.13/site-packages/setuptools/tests
mkdir
upload
Name
Size
Mode
Actions
compat/
-
0755
rm
config/
-
0755
rm
indexes/
-
0755
rm
integration/
-
0755
rm
__pycache__/
-
0755
rm
contexts.py
3166
0644
edit
dl
rm
environment.py
3102
0644
edit
dl
rm
fixtures.py
12224
0644
edit
dl
rm
mod_with_constant.py
22
0644
edit
dl
rm
namespaces.py
2774
0644
edit
dl
rm
script-with-bom.py
18
0644
edit
dl
rm
test_archive_util.py
845
0644
edit
dl
rm
test_bdist_deprecations.py
775
0644
edit
dl
rm
test_bdist_egg.py
1957
0644
edit
dl
rm
test_bdist_wheel.py
23091
0644
edit
dl
rm
test_build.py
798
0644
edit
dl
rm
test_build_clib.py
3123
0644
edit
dl
rm
test_build_ext.py
10099
0644
edit
dl
rm
test_build_meta.py
33320
0644
edit
dl
rm
test_build_py.py
14201
0644
edit
dl
rm
test_config_discovery.py
22580
0644
edit
dl
rm
test_core_metadata.py
18038
0644
edit
dl
rm
test_depends.py
424
0644
edit
dl
rm
test_develop.py
3136
0644
edit
dl
rm
test_dist.py
8951
0644
edit
dl
rm
test_distutils_adoption.py
5987
0644
edit
dl
rm
test_dist_info.py
5005
0644
edit
dl
rm
test_editable_install.py
42498
0644
edit
dl
rm
test_egg_info.py
44941
0644
edit
dl
rm
test_extern.py
296
0644
edit
dl
rm
test_find_packages.py
7819
0644
edit
dl
rm
test_find_py_modules.py
2404
0644
edit
dl
rm
test_glob.py
887
0644
edit
dl
rm
test_install_scripts.py
3433
0644
edit
dl
rm
test_logging.py
2096
0644
edit
dl
rm
test_manifest.py
18562
0644
edit
dl
rm
test_namespaces.py
2508
0644
edit
dl
rm
test_scripts.py
379
0644
edit
dl
rm
test_sdist.py
32808
0644
edit
dl
rm
test_setopt.py
1365
0644
edit
dl
rm
test_setuptools.py
9323
0644
edit
dl
rm
test_shutil_wrapper.py
641
0644
edit
dl
rm
test_unicode_utils.py
316
0644
edit
dl
rm
test_virtualenv.py
3730
0644
edit
dl
rm
test_warnings.py
3347
0644
edit
dl
rm
test_wheel.py
18722
0644
edit
dl
rm
test_windows_wrappers.py
7868
0644
edit
dl
rm
text.py
123
0644
edit
dl
rm
textwrap.py
98
0644
edit
dl
rm
__init__.py
335
0644
edit
dl
rm
Edit:
/usr/lib/imh-ultrastack-common/venv/lib/python3.13/site-packages/setuptools/tests/test_warnings.py
(3347B)
from inspect import cleandoc import pytest from setuptools.warnings import SetuptoolsDeprecationWarning, SetuptoolsWarning _EXAMPLES = { "default": dict( args=("Hello {x}", "\n\t{target} {v:.1f}"), kwargs={"x": 5, "v": 3, "target": "World"}, expected=""" Hello 5 !! ******************************************************************************** World 3.0 ******************************************************************************** !! """, ), "futue_due_date": dict( args=("Summary", "Lorem ipsum"), kwargs={"due_date": (9999, 11, 22)}, expected=""" Summary !! ******************************************************************************** Lorem ipsum By 9999-Nov-22, you need to update your project and remove deprecated calls or your builds will no longer be supported. ******************************************************************************** !! """, ), "past_due_date_with_docs": dict( args=("Summary", "Lorem ipsum"), kwargs={"due_date": (2000, 11, 22), "see_docs": "some_page.html"}, expected=""" Summary !! ******************************************************************************** Lorem ipsum This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See https://setuptools.pypa.io/en/latest/some_page.html for details. ******************************************************************************** !! """, ), } @pytest.mark.parametrize("example_name", _EXAMPLES.keys()) def test_formatting(monkeypatch, example_name): """ It should automatically handle indentation, interpolation and things like due date. """ args = _EXAMPLES[example_name]["args"] kwargs = _EXAMPLES[example_name]["kwargs"] expected = _EXAMPLES[example_name]["expected"] monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "false") with pytest.warns(SetuptoolsWarning) as warn_info: SetuptoolsWarning.emit(*args, **kwargs) assert _get_message(warn_info) == cleandoc(expected) def test_due_date_enforcement(monkeypatch): class _MyDeprecation(SetuptoolsDeprecationWarning): _SUMMARY = "Summary" _DETAILS = "Lorem ipsum" _DUE_DATE = (2000, 11, 22) _SEE_DOCS = "some_page.html" monkeypatch.setenv("SETUPTOOLS_ENFORCE_DEPRECATION", "true") with pytest.raises(SetuptoolsDeprecationWarning) as exc_info: _MyDeprecation.emit() expected = """ Summary !! ******************************************************************************** Lorem ipsum This deprecation is overdue, please update your project and remove deprecated calls to avoid build errors in the future. See https://setuptools.pypa.io/en/latest/some_page.html for details. ******************************************************************************** !! """ assert str(exc_info.value) == cleandoc(expected) def _get_message(warn_info): return next(warn.message.args[0] for warn in warn_info)
Save
cmd:
run