From 9e4a1af958c8ebbbe0cda2d2cbe5be065ee0bdef Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Fri, 19 Aug 2022 18:16:06 +0100 Subject: Replicate problems with `setup.py --version` and auto-discovery --- setuptools/tests/test_config_discovery.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setuptools/tests/test_config_discovery.py b/setuptools/tests/test_config_discovery.py index fac365f4..f6c114af 100644 --- a/setuptools/tests/test_config_discovery.py +++ b/setuptools/tests/test_config_discovery.py @@ -508,6 +508,15 @@ def test_compatible_with_numpy_configuration(tmp_path): assert dist.packages is None +def test_name_discovery_doesnt_break_cli(tmpdir_cwd): + jaraco.path.build({"pkg.py": ""}) + dist = Distribution({}) + dist.script_args = ["--name"] + dist.set_defaults() + dist.parse_command_line() # <-- no exception should be raised here. + assert dist.get_name() == "pkg" + + def _populate_project_dir(root, files, options): # NOTE: Currently pypa/build will refuse to build the project if no # `pyproject.toml` or `setup.py` is found. So it is impossible to do -- cgit v1.2.1