(self)
| 1405 | # in all possible mode combinations. |
| 1406 | |
| 1407 | def test_fileobj_no_close(self): |
| 1408 | fobj = io.BytesIO() |
| 1409 | with tarfile.open(fileobj=fobj, mode=self.mode) as tar: |
| 1410 | tar.addfile(tarfile.TarInfo("foo")) |
| 1411 | self.assertFalse(fobj.closed, "external fileobjs must never closed") |
| 1412 | # Issue #20238: Incomplete gzip output with mode="w:gz" |
| 1413 | data = fobj.getvalue() |
| 1414 | del tar |
| 1415 | support.gc_collect() |
| 1416 | self.assertFalse(fobj.closed) |
| 1417 | self.assertEqual(data, fobj.getvalue()) |
| 1418 | |
| 1419 | def test_eof_marker(self): |
| 1420 | # Make sure an end of archive marker is written (two zero blocks). |
nothing calls this directly
no test coverage detected