diff options
Diffstat (limited to 'setuptools/tests/test_build_py.py')
-rw-r--r-- | setuptools/tests/test_build_py.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/setuptools/tests/test_build_py.py b/setuptools/tests/test_build_py.py new file mode 100644 index 0000000..cc701ae --- /dev/null +++ b/setuptools/tests/test_build_py.py @@ -0,0 +1,30 @@ +import os + +import pytest + +from setuptools.dist import Distribution + + +@pytest.yield_fixture +def tmpdir_as_cwd(tmpdir): + with tmpdir.as_cwd(): + yield tmpdir + + +def test_directories_in_package_data_glob(tmpdir_as_cwd): + """ + Directories matching the glob in package_data should + not be included in the package data. + + Regression test for #261. + """ + dist = Distribution(dict( + script_name='setup.py', + script_args=['build_py'], + packages=[''], + name='foo', + package_data={'': ['path/*']}, + )) + os.makedirs('path/subpath') + dist.parse_command_line() + dist.run_commands() |