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

Method test_empty_name_attribute

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

Source from the content-addressed store, hash-verified

568 self.assertIsNone(tar.name)
569
570 def test_empty_name_attribute(self):
571 with open(self.tarname, "rb") as fobj:
572 data = fobj.read()
573 fobj = io.BytesIO(data)
574 fobj.name = ""
575 with tarfile.open(fileobj=fobj, mode=self.mode) as tar:
576 self.assertIsNone(tar.name)
577
578 def test_int_name_attribute(self):
579 # Issue 21044: tarfile.open() should handle fileobj with an integer

Callers

nothing calls this directly

Calls 4

readMethod · 0.95
assertIsNoneMethod · 0.80
openFunction · 0.50
openMethod · 0.45

Tested by

no test coverage detected