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

Method test_next_on_empty_tarfile

Lib/test/test_tarfile.py:831–842  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

829 tarfile.open(self.tarname)
830
831 def test_next_on_empty_tarfile(self):
832 fd = io.BytesIO()
833 tf = tarfile.open(fileobj=fd, mode="w")
834 tf.close()
835
836 fd.seek(0)
837 with tarfile.open(fileobj=fd, mode="r|") as tf:
838 self.assertEqual(tf.next(), None)
839
840 fd.seek(0)
841 with tarfile.open(fileobj=fd, mode="r") as tf:
842 self.assertEqual(tf.next(), None)
843
844 def _setup_symlink_to_target(self, temp_dirpath):
845 target_filepath = os.path.join(temp_dirpath, "target")

Callers

nothing calls this directly

Calls 5

seekMethod · 0.95
openMethod · 0.45
closeMethod · 0.45
assertEqualMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected