diff options
author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-08-11 18:51:42 +0100 |
---|---|---|
committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2022-08-11 18:51:42 +0100 |
commit | abeda22f90ec3928656489b906480910d54d9da4 (patch) | |
tree | b23bdfe904171405895220d1d22ff74a08eaead1 | |
parent | bc39d28bda2a1faee6680ae30e42526b9d775151 (diff) | |
download | python-setuptools-git-abeda22f90ec3928656489b906480910d54d9da4.tar.gz |
Reproduce problem with editable install in issue 3499
-rw-r--r-- | setuptools/tests/test_editable_install.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/setuptools/tests/test_editable_install.py b/setuptools/tests/test_editable_install.py index 57e31eda..85c34b93 100644 --- a/setuptools/tests/test_editable_install.py +++ b/setuptools/tests/test_editable_install.py @@ -163,6 +163,35 @@ def test_editable_with_flat_layout(tmp_path, venv, editable_opts): assert subprocess.check_output(cmd).strip() == b"4 2" +def test_editable_with_single_module(tmp_path, venv, editable_opts): + files = { + "mypkg": { + "pyproject.toml": dedent("""\ + [build-system] + requires = ["setuptools", "wheel"] + build-backend = "setuptools.build_meta" + + [project] + name = "mod" + version = "3.14159" + + [tool.setuptools] + py-modules = ["mod"] + """), + "mod.py": "b = 2", + }, + } + jaraco.path.build(files, prefix=tmp_path) + project = tmp_path / "mypkg" + + cmd = [venv.exe(), "-m", "pip", "install", + "--no-build-isolation", # required to force current version of setuptools + "-e", str(project), *editable_opts] + print(str(subprocess.check_output(cmd), "utf-8")) + cmd = [venv.exe(), "-c", "import mod; print(mod.b)"] + assert subprocess.check_output(cmd).strip() == b"2" + + class TestLegacyNamespaces: """Ported from test_develop""" |