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

Unified Diff: Lib/test/test_zipfile.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_webbrowser.py ('k') | Lib/unittest/test/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_zipfile.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/test/test_zipfile.py Wed Mar 02 00:01:35 2016 +0000
@@ -688,16 +688,17 @@ class PyZipFileTests(unittest.TestCase):
filename = os.path.join(path, 'test_zipfile.try')
try:
fd = os.open(filename, os.O_WRONLY | os.O_CREAT)
os.close(fd)
except Exception:
self.skipTest('requires write access to the installed location')
unlink(filename)
+ @unittest.skipIf(sys.dont_write_bytecode, "Test requires ability to write bytecode")
def test_write_pyfile(self):
self.requiresWriteAccess(os.path.dirname(__file__))
with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
fn = __file__
if fn.endswith('.pyc'):
path_split = fn.split(os.sep)
if os.altsep is not None:
path_split.extend(fn.split(os.altsep))
@@ -732,16 +733,17 @@ class PyZipFileTests(unittest.TestCase):
zipfp.writepy(packagedir)
# Check for a couple of modules at different levels of the
# hierarchy
names = zipfp.namelist()
self.assertCompiledIn('email/__init__.py', names)
self.assertCompiledIn('email/mime/text.py', names)
+ @unittest.skipIf(sys.dont_write_bytecode, "Test requires ability to write bytecode")
def test_write_filtered_python_package(self):
import test
packagedir = os.path.dirname(test.__file__)
self.requiresWriteAccess(packagedir)
with TemporaryFile() as t, zipfile.PyZipFile(t, "w") as zipfp:
# first make sure that the test folder gives error messages
« no previous file with comments | « Lib/test/test_webbrowser.py ('k') | Lib/unittest/test/test_runner.py » ('j') | no next file with comments »

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