aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_find_packages.py
diff options
context:
space:
mode:
authorCarsten Klein <trancesilken@gmail.com>2018-08-17 14:58:35 +0200
committerPaul Ganssle <pganssle@users.noreply.github.com>2018-08-17 08:58:35 -0400
commit0254a2fda8e8bd4f289d01e2179191e936517f04 (patch)
tree6007c5bc0b659c4d69ffbcc8df917f7a0c747cdf /setuptools/tests/test_find_packages.py
parentbbf99b7e599766e15dc56f58f68fe6c32c972faf (diff)
downloadexternal_python_setuptools-0254a2fda8e8bd4f289d01e2179191e936517f04.tar.gz
external_python_setuptools-0254a2fda8e8bd4f289d01e2179191e936517f04.tar.bz2
external_python_setuptools-0254a2fda8e8bd4f289d01e2179191e936517f04.zip
Rename find_namepaces_ns to find_namespace_packages (#1423)
* fix #1419 PEP420: add find_namespace: directive * fix #1419 PEP420: add find_namespace: directive to documentation * fix #1419 PEP420: add tests * fix #1419 PEP420: clean up code * fix #1419 PEP420: fix typo in documentation * fix #1419 PEP420: fix typo in documentation * fix #1419 PEP420: clean up code * fix #1419 PEP420: add changelog entry * fixup! fix #1419 PEP420: add tests * fix #1419 PEP420: cleanup code refactor markers * #1420: Rename find_namespace_ns to find_namespace_packages * #1420: update changelog entry
Diffstat (limited to 'setuptools/tests/test_find_packages.py')
-rw-r--r--setuptools/tests/test_find_packages.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py
index 02ae5a94..b08f91c7 100644
--- a/setuptools/tests/test_find_packages.py
+++ b/setuptools/tests/test_find_packages.py
@@ -7,12 +7,12 @@ import platform
import pytest
+from . import py3_only
+
from setuptools.extern.six import PY3
from setuptools import find_packages
-
-py3_only = pytest.mark.xfail(not PY3, reason="Test runs on Python 3 only")
if PY3:
- from setuptools import find_packages_ns
+ from setuptools import find_namespace_packages
# modeled after CPython's test.support.can_symlink
@@ -156,26 +156,26 @@ class TestFindPackages:
@py3_only
def test_pep420_ns_package(self):
- packages = find_packages_ns(
+ packages = find_namespace_packages(
self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets'])
self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg'])
@py3_only
def test_pep420_ns_package_no_includes(self):
- packages = find_packages_ns(
+ packages = find_namespace_packages(
self.dist_dir, exclude=['pkg.subpkg.assets'])
self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg'])
@py3_only
def test_pep420_ns_package_no_includes_or_excludes(self):
- packages = find_packages_ns(self.dist_dir)
+ packages = find_namespace_packages(self.dist_dir)
expected = ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets']
self._assert_packages(packages, expected)
@py3_only
def test_regular_package_with_nested_pep420_ns_packages(self):
self._touch('__init__.py', self.pkg_dir)
- packages = find_packages_ns(
+ packages = find_namespace_packages(
self.dist_dir, exclude=['docs', 'pkg.subpkg.assets'])
self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg'])
@@ -183,6 +183,6 @@ class TestFindPackages:
def test_pep420_ns_package_no_non_package_dirs(self):
shutil.rmtree(self.docs_dir)
shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets'))
- packages = find_packages_ns(self.dist_dir)
+ packages = find_namespace_packages(self.dist_dir)
self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg'])