diff options
author | Luke Plant <L.Plant.98@cantab.net> | 2015-10-19 12:04:26 +0100 |
---|---|---|
committer | Luke Plant <L.Plant.98@cantab.net> | 2015-10-19 12:04:26 +0100 |
commit | b91de5ee3f2ff8530d03190a5d2181a803f7400c (patch) | |
tree | 508790bfac0d3e6ae1b01249107e72aee3a6e764 | |
parent | e90eda1afc6950aecd9b68de1a4c1204d749fd3a (diff) | |
download | python-setuptools-bitbucket-b91de5ee3f2ff8530d03190a5d2181a803f7400c.tar.gz |
Added test to ensure that egg_info applies MANIFEST.in
The 'self.read_template()' line of manifest_maker was previously uncovered
by any test, and the test suite passed if you commented it out.
-rw-r--r-- | setuptools/tests/test_egg_info.py | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4977ea01..8281fdc1 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -58,7 +58,7 @@ class TestEggInfo: self._create_project() self._run_install_command(tmpdir_cwd, env) - actual = self._find_egg_info_files(env.paths['lib']) + _, actual = self._find_egg_info_files(env.paths['lib']) expected = [ 'PKG-INFO', @@ -70,6 +70,21 @@ class TestEggInfo: ] assert sorted(actual) == expected + def test_manifest_template_is_read(self, tmpdir_cwd, env): + self._create_project() + build_files({ + 'MANIFEST.in': DALS(""" + recursive-include docs *.rst + """), + 'docs': { + 'usage.rst': "Run 'hi'", + } + }) + self._run_install_command(tmpdir_cwd, env) + egg_info_dir, _ = self._find_egg_info_files(env.paths['lib']) + sources_txt = os.path.join(egg_info_dir, 'SOURCES.txt') + assert 'docs/usage.rst' in open(sources_txt).read().split('\n') + def _run_install_command(self, tmpdir_cwd, env): environ = os.environ.copy().update( HOME=env.paths['home'], @@ -92,7 +107,7 @@ class TestEggInfo: def _find_egg_info_files(self, root): results = ( - filenames + (dirpath, filenames) for dirpath, dirnames, filenames in os.walk(root) if os.path.basename(dirpath) == 'EGG-INFO' ) |