Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12)

Delta Between Two Patch Sets: Lib/test/test_zipfile.py

Issue 26295: Random failures when running test suite in parallel (-m test -j0) caused by test_regrtest
Left Patch Set: Created 3 years, 11 months ago
Right Patch Set: Created 3 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/test/test_regrtest.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 import contextlib 1 import contextlib
2 import io 2 import io
3 import os 3 import os
4 import sys 4 import sys
5 import importlib.util 5 import importlib.util
6 import posixpath 6 import posixpath
7 import time 7 import time
8 import struct 8 import struct
9 import zipfile 9 import zipfile
10 import unittest 10 import unittest
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 zipfp.writepy(packagedir) 732 zipfp.writepy(packagedir)
733 733
734 # Check for a couple of modules at different levels of the 734 # Check for a couple of modules at different levels of the
735 # hierarchy 735 # hierarchy
736 names = zipfp.namelist() 736 names = zipfp.namelist()
737 self.assertCompiledIn('email/__init__.py', names) 737 self.assertCompiledIn('email/__init__.py', names)
738 self.assertCompiledIn('email/mime/text.py', names) 738 self.assertCompiledIn('email/mime/text.py', names)
739 739
740 def test_write_filtered_python_package(self): 740 def test_write_filtered_python_package(self):
741 import test 741 import test
742 packagedir = os.path.dirname(test.__file__) 742 packagedir = os.path.dirname(__file__)
743 self.requiresWriteAccess(packagedir) 743 self.requiresWriteAccess(packagedir)
744 744
745 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp: 745 with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
746 746
747 # first make sure that the test folder gives error messages 747 # first make sure that the test folder gives error messages
748 # (on the badsyntax_... files) 748 # (on the badsyntax_... files)
749 with captured_stdout() as reportSIO: 749 with captured_stdout() as reportSIO:
750 zipfp.writepy(packagedir) 750 zipfp.writepy(packagedir)
751 reportStr = reportSIO.getvalue() 751 reportStr = reportSIO.getvalue()
752 self.assertTrue('SyntaxError' in reportStr) 752 self.assertTrue('SyntaxError' in reportStr)
(...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 def test_from_dir(self): 2081 def test_from_dir(self):
2082 dirpath = os.path.dirname(os.path.abspath(__file__)) 2082 dirpath = os.path.dirname(os.path.abspath(__file__))
2083 zi = zipfile.ZipInfo.from_file(dirpath, 'stdlib_tests') 2083 zi = zipfile.ZipInfo.from_file(dirpath, 'stdlib_tests')
2084 self.assertEqual(zi.filename, 'stdlib_tests/') 2084 self.assertEqual(zi.filename, 'stdlib_tests/')
2085 self.assertTrue(zi.is_dir()) 2085 self.assertTrue(zi.is_dir())
2086 self.assertEqual(zi.compress_type, zipfile.ZIP_STORED) 2086 self.assertEqual(zi.compress_type, zipfile.ZIP_STORED)
2087 self.assertEqual(zi.file_size, 0) 2087 self.assertEqual(zi.file_size, 0)
2088 2088
2089 if __name__ == "__main__": 2089 if __name__ == "__main__":
2090 unittest.main() 2090 unittest.main()
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+