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

Method test_append_mode_tell

Lib/test/test_io/test_general.py:373–381  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

371
372 # issue 5008
373 def test_append_mode_tell(self):
374 with self.open(os_helper.TESTFN, "wb") as f:
375 f.write(b"xxx")
376 with self.open(os_helper.TESTFN, "ab", buffering=0) as f:
377 self.assertEqual(f.tell(), 3)
378 with self.open(os_helper.TESTFN, "ab") as f:
379 self.assertEqual(f.tell(), 3)
380 with self.open(os_helper.TESTFN, "a", encoding="utf-8") as f:
381 self.assertGreater(f.tell(), 0)
382
383 def test_destructor(self):
384 record = []

Callers

nothing calls this directly

Calls 5

assertGreaterMethod · 0.80
openMethod · 0.45
writeMethod · 0.45
assertEqualMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected