MCPcopy Index your code
hub / github.com/python/cpython / _test_around_boundary

Method _test_around_boundary

Lib/test/test_mmap.py:1270–1276  ·  view source on GitHub ↗
(self, boundary)

Source from the content-addressed store, hash-verified

1268 # Issue 11277: mmap() with large (~4 GiB) sparse files crashes on OS X.
1269
1270 def _test_around_boundary(self, boundary):
1271 tail = b' DEARdear '
1272 start = boundary - len(tail) // 2
1273 end = start + len(tail)
1274 with self._make_test_file(start, tail) as f:
1275 with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as m:
1276 self.assertEqual(m[start:end], tail)
1277
1278 @unittest.skipUnless(sys.maxsize > _4G, "test cannot run on 32-bit systems")
1279 def test_around_2GB(self):

Callers 2

test_around_2GBMethod · 0.95
test_around_4GBMethod · 0.95

Calls 3

_make_test_fileMethod · 0.95
filenoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected