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

Method test_seekable

Lib/test/test_io/test_largefile.py:147–153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

145 self.assertEqual(len(f.read()), 1) # else wasn't truncated
146
147 def test_seekable(self):
148 # Issue #5016; seekable() can return False when the current position
149 # is negative when truncated to an int.
150 for pos in (2**31-1, 2**31, 2**31+1):
151 with self.open(TESTFN, 'rb') as f:
152 f.seek(pos)
153 self.assertTrue(f.seekable())
154
155 @bigmemtest(size=size, memuse=1, dry_run=False)
156 def test_seek_readall(self, _size):

Callers

nothing calls this directly

Calls 4

assertTrueMethod · 0.80
openMethod · 0.45
seekMethod · 0.45
seekableMethod · 0.45

Tested by

no test coverage detected