(self)
| 1254 | self.assertEqual(m[0xFFFFFFF], 32) |
| 1255 | |
| 1256 | def test_large_filesize(self): |
| 1257 | with self._make_test_file(0x17FFFFFFF, b" ") as f: |
| 1258 | if sys.maxsize < 0x180000000: |
| 1259 | # On 32 bit platforms the file is larger than sys.maxsize so |
| 1260 | # mapping the whole file should fail -- Issue #16743 |
| 1261 | with self.assertRaises(OverflowError): |
| 1262 | mmap.mmap(f.fileno(), 0x180000000, access=mmap.ACCESS_READ) |
| 1263 | with self.assertRaises(ValueError): |
| 1264 | mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) |
| 1265 | with mmap.mmap(f.fileno(), 0x10000, access=mmap.ACCESS_READ) as m: |
| 1266 | self.assertEqual(m.size(), 0x180000000) |
| 1267 | |
| 1268 | # Issue 11277: mmap() with large (~4 GiB) sparse files crashes on OS X. |
| 1269 |
nothing calls this directly
no test coverage detected