diff options
| author | Éric Araujo <merwok@netwok.org> | 2011-06-07 15:31:39 (GMT) |
|---|---|---|
| committer | Éric Araujo <merwok@netwok.org> | 2011-06-07 15:31:39 (GMT) |
| commit | 313570a1851bbe8c44af07be2eceb021fea6c994 (patch) | |
| tree | 19e92183602f61a4d6d107c8569440baf8cab213 /Lib/packaging/tests/test_command_sdist.py | |
| parent | 1752468d39a38ac73ec13fc1f8f6427623b69074 (diff) | |
| parent | 69cdf9294fee18e3b38278f2baf00c15c7bdbd8e (diff) | |
| download | cpython-313570a1851bbe8c44af07be2eceb021fea6c994.zip cpython-313570a1851bbe8c44af07be2eceb021fea6c994.tar.gz cpython-313570a1851bbe8c44af07be2eceb021fea6c994.tar.bz2 | |
Branch merge: packaging fixes
Diffstat (limited to 'Lib/packaging/tests/test_command_sdist.py')
| -rw-r--r-- | Lib/packaging/tests/test_command_sdist.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/packaging/tests/test_command_sdist.py b/Lib/packaging/tests/test_command_sdist.py index 41b2a24..7be349f 100644 --- a/Lib/packaging/tests/test_command_sdist.py +++ b/Lib/packaging/tests/test_command_sdist.py @@ -34,6 +34,7 @@ setup(name='fake') MANIFEST = """\ # file GENERATED by packaging, do NOT edit inroot.txt +setup.cfg data%(sep)sdata.dt scripts%(sep)sscript.py some%(sep)sfile.txt @@ -173,6 +174,7 @@ class SDistTestCase(support.TempdirManager, # in package_data dist.package_data = {'': ['*.cfg', '*.dat'], 'somecode': ['*.txt']} + self.write_file((self.tmp_dir, 'setup.cfg'), '#') self.write_file((self.tmp_dir, 'somecode', 'doc.txt'), '#') self.write_file((self.tmp_dir, 'somecode', 'doc.dat'), '#') @@ -211,9 +213,9 @@ class SDistTestCase(support.TempdirManager, with zipfile.ZipFile(join(dist_folder, 'fake-1.0.zip')) as zip_file: content = zip_file.namelist() - # Making sure everything was added. This includes 9 code and data - # files in addition to PKG-INFO. - self.assertEqual(len(content), 9) + # Making sure everything was added. This includes 8 code and data + # files in addition to PKG-INFO and setup.cfg + self.assertEqual(len(content), 10) # Checking the MANIFEST with open(join(self.tmp_dir, 'MANIFEST')) as fp: @@ -230,7 +232,7 @@ class SDistTestCase(support.TempdirManager, cmd.ensure_finalized() cmd.run() warnings = self.get_logs(logging.WARN) - self.assertEqual(len(warnings), 3) + self.assertEqual(len(warnings), 4) # trying with a complete set of metadata self.loghandler.flush() @@ -242,8 +244,9 @@ class SDistTestCase(support.TempdirManager, # removing manifest generated warnings warnings = [warn for warn in warnings if not warn.endswith('-- skipping')] - # the remaining warning is about the use of the default file list - self.assertEqual(len(warnings), 1) + # the remaining warnings are about the use of the default file list and + # the absence of setup.cfg + self.assertEqual(len(warnings), 2) def test_show_formats(self): __, stdout = captured_stdout(show_formats) |
