Skip to content

Commit

Permalink
Capture behaviour of issue 3692 in test
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Nov 22, 2022
1 parent 59ee498 commit 6deebc6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions setuptools/tests/test_config_discovery.py
Expand Up @@ -248,6 +248,19 @@ def test_flat_layout_with_multiple_modules(self, tmp_path):
with pytest.raises(PackageDiscoveryError, match="multiple (packages|modules)"):
_get_dist(tmp_path, {})

def test_py_modules_when_wheel_dir_is_cwd(self, tmp_path):
"""Regression for issue 3692"""
from setuptools import build_meta

pyproject = '[project]\nname = "test"\nversion = "1"'
(tmp_path / "pyproject.toml").write_text(DALS(pyproject), encoding="utf-8")
(tmp_path / "foo.py").touch()
with jaraco.path.DirectoryStack().context(tmp_path):
build_meta.build_wheel(".")
# Ensure py_modules are found
wheel_files = get_wheel_members(next(tmp_path.glob("*.whl")))
assert "foo.py" in wheel_files


class TestNoConfig:
DEFAULT_VERSION = "0.0.0" # Default version given by setuptools
Expand Down

0 comments on commit 6deebc6

Please sign in to comment.