diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2014-04-07 19:20:31 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-04-07 19:20:31 -0400 |
commit | b118b5f25040715111699eff1345d1eb08457270 (patch) | |
tree | f5edc97caf52151b468f98dd8b6de622431addb7 | |
parent | 951352507c88bc2430bf21d00adf16b1e55de105 (diff) | |
download | external_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.py | 11 |
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)) |