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

Unified Diff: Lib/test/test_mmap.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_marshal.py ('k') | Lib/test/test_os.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_mmap.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/test/test_mmap.py Wed Mar 02 00:01:35 2016 +0000
@@ -224,17 +224,17 @@ class MmapTests(unittest.TestCase):
# Ensuring copy-on-write maps cannot be resized
self.assertRaises(TypeError, m.resize, 2*mapsize)
m.close()
# Ensuring invalid access parameter raises exception
with open(TESTFN, "r+b") as f:
self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize, access=4)
- if os.name == "posix":
+ if os.name == "posix" and sys.platform != 'ios':
# Try incompatible flags, prot and access parameters.
with open(TESTFN, "r+b") as f:
self.assertRaises(ValueError, mmap.mmap, f.fileno(), mapsize,
flags=mmap.MAP_PRIVATE,
prot=mmap.PROT_READ, access=mmap.ACCESS_WRITE)
# Try writing with PROT_EXEC and without PROT_WRITE
prot = mmap.PROT_READ | getattr(mmap, 'PROT_EXEC', 0)
@@ -717,17 +717,17 @@ class LargeMmapTests(unittest.TestCase):
def setUp(self):
unlink(TESTFN)
def tearDown(self):
unlink(TESTFN)
def _make_test_file(self, num_zeroes, tail):
- if sys.platform[:3] == 'win' or sys.platform == 'darwin':
+ if sys.platform[:3] == 'win' or sys.platform in ('darwin', 'ios'):
requires('largefile',
'test requires %s bytes and a long time to run' % str(0x180000000))
f = open(TESTFN, 'w+b')
try:
f.seek(num_zeroes)
f.write(tail)
f.flush()
except (OSError, OverflowError):
« no previous file with comments | « Lib/test/test_marshal.py ('k') | Lib/test/test_os.py » ('j') | no next file with comments »

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