(self)
| 919 | self.assertEqual(m[0xFFFFFFF], 32) |
| 920 | |
| 921 | def test_large_filesize(self): |
| 922 | with self._make_test_file(0x17FFFFFFF, b" ") as f: |
| 923 | if sys.maxsize < 0x180000000: |
| 924 | # On 32 bit platforms the file is larger than sys.maxsize so |
| 925 | # mapping the whole file should fail -- Issue #16743 |
| 926 | with self.assertRaises(OverflowError): |
| 927 | mmap.mmap(f.fileno(), 0x180000000, access=mmap.ACCESS_READ) |
| 928 | with self.assertRaises(ValueError): |
| 929 | mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) |
| 930 | with mmap.mmap(f.fileno(), 0x10000, access=mmap.ACCESS_READ) as m: |
| 931 | self.assertEqual(m.size(), 0x180000000) |
| 932 | |
| 933 | # Issue 11277: mmap() with large (~4 GiB) sparse files crashes on OS X. |
| 934 |
nothing calls this directly
no test coverage detected