From 992adf2f5684e6660335d616149e050b3eaaed17 Mon Sep 17 00:00:00 2001 From: Tim Heap Date: Mon, 26 Sep 2016 14:00:00 +1000 Subject: Note find_packages backwards incompatible change Also add a test for the new behaviour. --- setuptools/tests/test_find_packages.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'setuptools/tests/test_find_packages.py') diff --git a/setuptools/tests/test_find_packages.py b/setuptools/tests/test_find_packages.py index df51b04f..9d31ccd7 100644 --- a/setuptools/tests/test_find_packages.py +++ b/setuptools/tests/test_find_packages.py @@ -98,6 +98,15 @@ class TestFindPackages: packages = find_packages(self.dist_dir, exclude=('pkg.*',)) assert packages == ['pkg'] + def test_exclude_recursive(self): + """ + Excluding a parent package should exclude all child packages as well. + """ + self._touch('__init__.py', self.pkg_dir) + self._touch('__init__.py', self.sub_pkg_dir) + packages = find_packages(self.dist_dir, exclude=('pkg',)) + assert packages == [] + def test_include_excludes_other(self): """ If include is specified, other packages should be excluded. -- cgit v1.2.1