aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2014-03-16 04:00:06 -0400
committerJason R. Coombs <jaraco@jaraco.com>2014-03-16 04:00:06 -0400
commitdb165ca67c638fdcae9b3a85154b2b4b23e3f5db (patch)
treedcd3c4557bfb50bc095d593c74626f3bf29e4587
parentcc20858d5ead318ae7e8ddcdaf61c610fa1e0578 (diff)
downloadexternal_python_setuptools-db165ca67c638fdcae9b3a85154b2b4b23e3f5db.tar.gz
external_python_setuptools-db165ca67c638fdcae9b3a85154b2b4b23e3f5db.tar.bz2
external_python_setuptools-db165ca67c638fdcae9b3a85154b2b4b23e3f5db.zip
Add test for find_packages(include=)
--HG-- extra : rebase_source : bee4238f4cd00fa8bd3104017f4caf234dcf0729
-rw-r--r--setuptools/tests/test_find_packages.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py
index f66ea333..1edbfab3 100644
--- a/setuptools/tests/test_find_packages.py
+++ b/setuptools/tests/test_find_packages.py
@@ -63,6 +63,16 @@ class TestFindPackages(unittest.TestCase):
packages = find_packages(self.dist_dir)
self.assertEqual(packages, ['pkg', 'pkg.subpkg'])
+ def test_include_excludes_other(self):
+ """
+ If include is specified, other packages should be excluded.
+ """
+ self._touch('__init__.py', self.pkg_dir)
+ alt_dir = self._mkdir('other_pkg', self.dist_dir)
+ self._touch('__init__.py', alt_dir)
+ packages = find_packages(self.dist_dir, include=['other_pkg'])
+ self.assertEqual(packages, ['other_pkg'])
+
def test_dir_with_dot_is_skipped(self):
shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets'))
data_dir = self._mkdir('some.data', self.pkg_dir)