diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-12-06 00:02:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 00:02:10 +0200 |
commit | b2742ba5f9ce8a6108202e0645662f2b58da423b (patch) | |
tree | af34d5b9b4559bd5f31b76d23bf3702473c05e58 /Lib/distutils/tests/test_sdist.py | |
parent | abe74feb912292aa4df4e70d39e85d0bcd425436 (diff) | |
download | cpython-git-b2742ba5f9ce8a6108202e0645662f2b58da423b.tar.gz |
[2.7] bpo-34738: Add directory entries in ZIP files created by distutils. (GH-9419). (GH-10950)
(cherry picked from commit 67a93b3a0b3814e97ef9d077b21325fc8ce351b2)
Diffstat (limited to 'Lib/distutils/tests/test_sdist.py')
-rw-r--r-- | Lib/distutils/tests/test_sdist.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/distutils/tests/test_sdist.py b/Lib/distutils/tests/test_sdist.py index 02c1d12e20..c503bd62b7 100644 --- a/Lib/distutils/tests/test_sdist.py +++ b/Lib/distutils/tests/test_sdist.py @@ -130,7 +130,9 @@ class SDistTestCase(PyPIRCCommandTestCase): zip_file.close() # making sure everything has been pruned correctly - self.assertEqual(len(content), 4) + expected = ['', 'PKG-INFO', 'README', 'setup.py', + 'somecode/', 'somecode/__init__.py'] + self.assertEqual(sorted(content), ['fake-1.0/' + x for x in expected]) @unittest.skipUnless(zlib, "requires zlib") def test_make_distribution(self): @@ -246,7 +248,13 @@ class SDistTestCase(PyPIRCCommandTestCase): zip_file.close() # making sure everything was added - self.assertEqual(len(content), 12) + expected = ['', 'PKG-INFO', 'README', 'buildout.cfg', + 'data/', 'data/data.dt', 'inroot.txt', + 'scripts/', 'scripts/script.py', 'setup.py', + 'some/', 'some/file.txt', 'some/other_file.txt', + 'somecode/', 'somecode/__init__.py', 'somecode/doc.dat', + 'somecode/doc.txt'] + self.assertEqual(sorted(content), ['fake-1.0/' + x for x in expected]) # checking the MANIFEST f = open(join(self.tmp_dir, 'MANIFEST')) |