MCPcopy Index your code
hub / github.com/RustPython/RustPython / _test_around_boundary

Method _test_around_boundary

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

Source from the content-addressed store, hash-verified

933 # Issue 11277: mmap() with large (~4 GiB) sparse files crashes on OS X.
934
935 def _test_around_boundary(self, boundary):
936 tail = b' DEARdear '
937 start = boundary - len(tail) // 2
938 end = start + len(tail)
939 with self._make_test_file(start, tail) as f:
940 with mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ) as m:
941 self.assertEqual(m[start:end], tail)
942
943 @unittest.skipUnless(sys.maxsize > _4G, "test cannot run on 32-bit systems")
944 def test_around_2GB(self):

Callers 2

test_around_2GBMethod · 0.95
test_around_4GBMethod · 0.95

Calls 4

_make_test_fileMethod · 0.95
lenFunction · 0.85
filenoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected