aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-04-07 19:20:31 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-04-07 19:20:31 -0400
commitb118b5f25040715111699eff1345d1eb08457270 (patch)
treef5edc97caf52151b468f98dd8b6de622431addb7
parent951352507c88bc2430bf21d00adf16b1e55de105 (diff)
downloadexternal_python_setuptools-b118b5f25040715111699eff1345d1eb08457270.tar.gz
external_python_setuptools-b118b5f25040715111699eff1345d1eb08457270.tar.bz2
external_python_setuptools-b118b5f25040715111699eff1345d1eb08457270.zip
Add test capturing overmatching in new find_packages. Ref #184.
-rw-r--r--setuptools/tests/test_find_packages.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py
index d8b6f47a..47ea9e05 100644
--- a/setuptools/tests/test_find_packages.py
+++ b/setuptools/tests/test_find_packages.py
@@ -88,6 +88,17 @@ class TestFindPackages(unittest.TestCase):
packages = find_packages(self.dist_dir)
self.assertTrue('pkg.some.data' not in packages)
+ def test_dir_with_packages_in_subdir_is_excluded(self):
+ """
+ Ensure that a package in a non-package such as build/pkg/__init__.py
+ is excluded.
+ """
+ build_dir = self._mkdir('build', self.dist_dir)
+ build_pkg_dir = self._mkdir('pkg', build_dir)
+ self._touch('__init__.py', build_pkg_dir)
+ packages = find_packages(self.dist_dir)
+ self.assertTrue('build.pkg' not in packages)
+
def _assert_packages(self, actual, expected):
self.assertEqual(set(actual), set(expected))