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

Method test_missing_fileobj

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

Source from the content-addressed store, hash-verified

1745 self.assertFalse(f.closed)
1746
1747 def test_missing_fileobj(self):
1748 with tarfile.open(tmpname, self.mode) as tar:
1749 tarinfo = tar.gettarinfo(tarname)
1750 with self.assertRaises(ValueError):
1751 tar.addfile(tarinfo)
1752
1753
1754class GzipWriteTest(GzipTest, WriteTest):

Callers

nothing calls this directly

Calls 4

gettarinfoMethod · 0.80
addfileMethod · 0.80
openMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected