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

Method seek

Lib/test/test_free_threading/test_mmap.py:137–142  ·  view source on GitHub ↗
(mm_obj)

Source from the content-addressed store, hash-verified

135 seek_per_thread = 10
136
137 def seek(mm_obj):
138 self.assertTrue(mm_obj.seekable())
139 for _ in range(seek_per_thread):
140 before_seek = mm_obj.tell()
141 mm_obj.seek(1, os.SEEK_CUR)
142 self.assertLess(before_seek, mm_obj.tell())
143
144 with mmap.mmap(ANONYMOUS_MEM, 1024) as mm_obj:
145 run_concurrently(

Callers 4

test_readlineMethod · 0.45

Calls 4

assertTrueMethod · 0.80
seekableMethod · 0.45
tellMethod · 0.45
assertLessMethod · 0.45

Tested by

no test coverage detected