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

Method make_mmap_file

Lib/test/test_mmap.py:486–492  ·  view source on GitHub ↗
(self, f, halfsize)

Source from the content-addressed store, hash-verified

484 self.assertEqual(m[:], bytes(L))
485
486 def make_mmap_file (self, f, halfsize):
487 # Write 2 pages worth of data to the file
488 f.write (b'\0' * halfsize)
489 f.write (b'foo')
490 f.write (b'\0' * (halfsize - 3))
491 f.flush ()
492 return mmap.mmap (f.fileno(), 0)
493
494 def test_empty_file (self):
495 f = open (TESTFN, 'w+b')

Callers 1

test_offsetMethod · 0.95

Calls 3

writeMethod · 0.45
flushMethod · 0.45
filenoMethod · 0.45

Tested by

no test coverage detected