summaryrefslogtreecommitdiff
path: root/setuptools/tests/config/test_expand.py
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2022-03-05 18:21:37 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2022-03-09 15:07:57 +0000
commit83d11a1402a800d6b9617c2dbb514fbf8de38591 (patch)
treec11019b15ec6cdda42745d7387da288c54864eee /setuptools/tests/config/test_expand.py
parent78294b8ff1c2ec841681a5769baa5741e86eefec (diff)
downloadpython-setuptools-git-83d11a1402a800d6b9617c2dbb514fbf8de38591.tar.gz
Allow expand.find_packges to fill package_dir
Diffstat (limited to 'setuptools/tests/config/test_expand.py')
-rw-r--r--setuptools/tests/config/test_expand.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/setuptools/tests/config/test_expand.py b/setuptools/tests/config/test_expand.py
index 2461347d..a7b0c21d 100644
--- a/setuptools/tests/config/test_expand.py
+++ b/setuptools/tests/config/test_expand.py
@@ -5,6 +5,7 @@ import pytest
from distutils.errors import DistutilsOptionError
from setuptools.command.sdist import sdist
from setuptools.config import expand
+from setuptools.discovery import find_package_path
def write_files(files, root_dir):
@@ -102,9 +103,13 @@ def test_find_packages(tmp_path, monkeypatch, args, pkgs):
}
write_files({k: "" for k in files}, tmp_path)
- with monkeypatch.context() as m:
- m.chdir(tmp_path)
- assert set(expand.find_packages(**args)) == pkgs
+ package_dir = {}
+ kwargs = {"root_dir": tmp_path, "fill_package_dir": package_dir, **args}
+ where = kwargs.get("where", ["."])
+ assert set(expand.find_packages(**kwargs)) == pkgs
+ for pkg in pkgs:
+ pkg_path = find_package_path(pkg, package_dir, tmp_path)
+ assert os.path.exists(pkg_path)
# Make sure the same APIs work outside cwd
where = [