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

Method test_anonymous

Lib/test/test_mmap.py:487–498  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

485 m.move(0, 0, 0)
486
487 def test_anonymous(self):
488 # anonymous mmap.mmap(-1, PAGE)
489 m = mmap.mmap(-1, PAGESIZE)
490 for x in range(PAGESIZE):
491 self.assertEqual(m[x], 0,
492 "anonymously mmap'ed contents should be zero")
493
494 for x in range(PAGESIZE):
495 b = x & 0xff
496 m[x] = b
497 self.assertEqual(m[x], b)
498 self.assertEqual(m.size(), PAGESIZE)
499
500 def test_read_all(self):
501 m = mmap.mmap(-1, 16)

Callers

nothing calls this directly

Calls 2

assertEqualMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected