summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-08-19 18:16:06 +0100
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-08-19 18:20:36 +0100
commit9e4a1af958c8ebbbe0cda2d2cbe5be065ee0bdef (patch)
tree737a60644a70626e937fc1504730ea4aafc70fd9
parentfeed34f981cd7035d787e1cb4825ea58a423152d (diff)
downloadpython-setuptools-git-9e4a1af958c8ebbbe0cda2d2cbe5be065ee0bdef.tar.gz
Replicate problems with `setup.py --version` and auto-discovery
-rw-r--r--setuptools/tests/test_config_discovery.py9
1 files changed, 9 insertions, 0 deletions
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