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

Method test_sparse

Lib/test/test_tempfile.py:1343–1352  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1341 self.assertTrue(f._rolled)
1342
1343 def test_sparse(self):
1344 # A SpooledTemporaryFile that is written late in the file will extend
1345 # when that occurs
1346 f = self.do_create(max_size=30)
1347 self.assertFalse(f._rolled)
1348 pos = f.seek(100, 0)
1349 self.assertEqual(pos, 100)
1350 self.assertFalse(f._rolled)
1351 f.write(b'x')
1352 self.assertTrue(f._rolled)
1353
1354 def test_fileno(self):
1355 # A SpooledTemporaryFile should roll over to a real file on fileno()

Callers

nothing calls this directly

Calls 6

do_createMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
seekMethod · 0.45
assertEqualMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected