MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_append_mode_tell

Method test_append_mode_tell

Lib/test/test_io.py:678–686  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

676
677 # issue 5008
678 def test_append_mode_tell(self):
679 with self.open(os_helper.TESTFN, "wb") as f:
680 f.write(b"xxx")
681 with self.open(os_helper.TESTFN, "ab", buffering=0) as f:
682 self.assertEqual(f.tell(), 3)
683 with self.open(os_helper.TESTFN, "ab") as f:
684 self.assertEqual(f.tell(), 3)
685 with self.open(os_helper.TESTFN, "a", encoding="utf-8") as f:
686 self.assertGreater(f.tell(), 0)
687
688 def test_destructor(self):
689 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