Lines Matching refs:tmpname
34 tmpname = os.path.join(TEMPDIR, "tmp.tar")
243 with tarfile.open(tmpname, self.mode.replace("r", "w")):
246 tar = tarfile.open(tmpname, self.mode)
259 with open(tmpname, "wb"):
261 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, self.mode)
262 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname)
286 with _open(tmpname, "wb") as fobj:
293 tar = tarfile.open(tmpname, mode="r", ignore_zeros=True)
302 with tarfile.open(tmpname, "w:") as tar:
307 with open(tmpname, "r+b") as fobj:
310 with tarfile.open(tmpname) as tar:
315 with tarfile.open(tmpname) as tar:
350 with open(tmpname, 'wb'):
352 self.addCleanup(os.unlink, tmpname)
354 tar = self.taropen(tmpname, 'q')
356 tar = self.taropen(tmpname, 'rw')
358 tar = self.taropen(tmpname, '')
605 with bz2.BZ2File(tmpname, "wb", compresslevel=1) as fobj:
608 self._testfunc_file(tmpname, "r|*")
810 tar = tarfile.open(tmpname, self.mode)
817 tar = tarfile.open(tmpname)
826 tar = tarfile.open(tmpname, self.mode)
834 self.assertTrue(os.path.getsize(tmpname) > 0,
839 tar = tarfile.open(tmpname, self.mode)
859 tar = tarfile.open(tmpname, self.mode)
876 tar = tarfile.open(tmpname, self.mode)
893 tar = tarfile.open(tmpname, self.mode)
904 dstname = os.path.abspath(tmpname)
905 tar = tarfile.open(tmpname, self.mode)
929 tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1")
937 tar = tarfile.open(tmpname, "r")
961 tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1")
967 tar = tarfile.open(tmpname, "r")
991 tar = tarfile.open(tmpname, self.mode)
997 tar = tarfile.open(tmpname, "r")
1037 tar = tarfile.open(tmpname, self.mode)
1043 tar = tarfile.open(tmpname, "r")
1150 tar = tarfile.open(tmpname, self.mode, fileobj=f,
1161 tar = tarfile.open(tmpname, self.mode)
1165 with gzip.GzipFile(tmpname) as fobj:
1169 with open(tmpname, "rb") as fobj:
1175 with open(tmpname, "rb") as fobj:
1186 if os.path.exists(tmpname):
1187 os.remove(tmpname)
1191 tar = tarfile.open(tmpname, self.mode)
1193 mode = os.stat(tmpname).st_mode & 0777
1200 with tarfile.open(unicode(tmpname, sys.getfilesystemencoding()), self.mode):
1236 tar = tarfile.open(tmpname, "w")
1247 tar = tarfile.open(tmpname)
1302 self.tar = tarfile.open(tmpname, "w")
1338 tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT)
1344 tar = tarfile.open(tmpname)
1363 tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT,
1371 tar = tarfile.open(tmpname, encoding="iso8859-1")
1393 tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT, encoding="iso8859-1")
1403 tar = tarfile.open(tmpname, encoding="iso8859-1")
1428 tar = tarfile.open(tmpname, "w", format=self.format, encoding=encoding, errors="strict")
1435 tar = tarfile.open(tmpname, encoding=encoding)
1443 tar = tarfile.open(tmpname, "w", format=self.format, encoding="ascii", errors="strict")
1503 tar = tarfile.open(tmpname, "w", format=self.format)
1516 tar = tarfile.open(tmpname, format=self.format, encoding="ascii",
1520 self.assertRaises(UnicodeError, tarfile.open, tmpname,
1528 tar = tarfile.open(tmpname, format=self.format, encoding="iso8859-1",
1537 self.tarname = tmpname
1589 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, "a")
1594 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, "a")
1717 with tarfile.open(tmpname, "w") as tar:
1721 self.assertEqual(os.path.getsize(tmpname), 0,
1728 with tarfile.open(tmpname, "w"):
1730 self.assertNotEqual(os.path.getsize(tmpname), 0,
1736 with open(tmpname, "wb") as fobj: