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

Method test_empty_name_attribute

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

Source from the content-addressed store, hash-verified

570 self.assertIsNone(tar.name)
571
572 def test_empty_name_attribute(self):
573 with open(self.tarname, "rb") as fobj:
574 data = fobj.read()
575 fobj = io.BytesIO(data)
576 fobj.name = ""
577 with tarfile.open(fileobj=fobj, mode=self.mode) as tar:
578 self.assertIsNone(tar.name)
579
580 def test_int_name_attribute(self):
581 # 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