Lines Matching refs:tmpname
39 tmpname = os.path.join(TEMPDIR, "tmp.tar") variable
325 with tarfile.open(tmpname, self.mode.replace("r", "w")):
328 tar = tarfile.open(tmpname, self.mode)
347 with open(tmpname, "wb"):
349 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, self.mode)
350 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname)
359 with self.open(tmpname, "w") as fobj:
366 tar = tarfile.open(tmpname, mode="r", ignore_zeros=True)
376 with tarfile.open(tmpname, "w:") as tar:
381 with open(tmpname, "r+b") as fobj:
384 with tarfile.open(tmpname) as tar:
389 with tarfile.open(tmpname) as tar:
461 with open(tmpname, 'wb'):
464 tar = self.taropen(tmpname, 'q')
466 tar = self.taropen(tmpname, 'rw')
468 tar = self.taropen(tmpname, '')
788 with bz2.BZ2File(tmpname, "wb", compresslevel=1) as fobj:
791 self._testfunc_file(tmpname, "r|*")
1061 with tarfile.open(tmpname, self.mode) as tar:
1066 with self.open(tmpname, "rb") as fobj:
1080 tar = tarfile.open(tmpname, self.mode)
1087 tar = tarfile.open(tmpname)
1096 tar = tarfile.open(tmpname, self.mode)
1104 self.assertGreater(os.path.getsize(tmpname), 0,
1109 tar = tarfile.open(tmpname, self.mode)
1128 tar = tarfile.open(tmpname, self.mode)
1145 tar = tarfile.open(tmpname, self.mode)
1162 with tarfile.open(tmpname, self.mode) as tar:
1184 tar = tarfile.open(tmpname, self.mode)
1201 tar = tarfile.open(tmpname, self.mode)
1212 dstname = os.path.abspath(tmpname)
1213 tar = tarfile.open(tmpname, self.mode)
1243 tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1")
1253 tar = tarfile.open(tmpname, "r")
1277 tar = tarfile.open(tmpname, self.mode)
1283 tar = tarfile.open(tmpname, "r")
1353 tar = tarfile.open(tmpname, self.mode)
1359 tar = tarfile.open(tmpname, "r")
1378 tar = tarfile.open(tmpname, self.mode, fileobj=f,
1400 tar = tarfile.open(tmpname, self.mode)
1404 with open(tmpname, "rb") as fobj:
1409 with self.open(tmpname) as fobj:
1419 if os.path.exists(tmpname):
1420 support.unlink(tmpname)
1424 tar = tarfile.open(tmpname, self.mode)
1426 mode = os.stat(tmpname).st_mode & 0o777
1469 tar = tarfile.open(tmpname, "w")
1480 tar = tarfile.open(tmpname)
1530 support.unlink(tmpname)
1542 with tarfile.open(tmpname, self.mode) as tobj:
1545 with self.taropen(tmpname) as tobj:
1551 with tarfile.open(tmpname, self.mode) as tobj:
1555 tobj = tarfile.open(tmpname, self.mode)
1557 with self.taropen(tmpname) as tobj:
1563 with self.taropen(tmpname, "x") as tobj:
1566 with self.taropen(tmpname) as tobj:
1572 with self.taropen(tmpname, "x") as tobj:
1576 with self.taropen(tmpname, "x"):
1579 with self.taropen(tmpname) as tobj:
1585 with tarfile.open(pathlib.Path(tmpname), self.mode) as tobj:
1587 self.assertEqual(tobj.name, os.path.abspath(tmpname))
1593 with self.taropen(tmpname) as tobj:
1599 with self.taropen(pathlib.Path(tmpname), "x") as tobj:
1601 self.assertEqual(tobj.name, os.path.abspath(tmpname))
1607 with self.taropen(tmpname) as tobj:
1649 self.tar = tarfile.open(tmpname, "w")
1685 tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT)
1691 tar = tarfile.open(tmpname)
1710 tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT,
1718 tar = tarfile.open(tmpname, encoding="iso8859-1")
1739 tar = tarfile.open(tmpname, "w", format=tarfile.PAX_FORMAT,
1750 tar = tarfile.open(tmpname, encoding="iso8859-1")
1772 tar = tarfile.open(tmpname, "w", format=self.format,
1780 tar = tarfile.open(tmpname, encoding=encoding)
1787 tar = tarfile.open(tmpname, "w", format=self.format,
1818 tar = tarfile.open(tmpname, mode="w", format=self.format,
1825 tar = tarfile.open(tmpname, encoding="iso8859-1")
1833 tar = tarfile.open(tmpname, encoding="ascii")
1880 with tarfile.open(tmpname, "w", format=self.format, encoding="utf-8") as tar:
1888 with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
1905 with tarfile.open(tmpname, "w", format=self.format, encoding="utf-8") as tar:
1914 with tarfile.open(tmpname, "r", encoding="utf-8") as tar:
1962 self.tarname = tmpname
1976 self.assertRaises(tarfile.ReadError, tarfile.open, tmpname, "a")
2247 with open(tmpname, 'wb') as f:
2249 rc, out, err = self.tarfilecmd_failure('-t', tmpname)
2253 support.unlink(tmpname)
2290 out = self.tarfilecmd(opt, tmpname, *files)
2292 with tarfile.open(tmpname) as tar:
2295 support.unlink(tmpname)
2303 out = self.tarfilecmd(opt, '-c', tmpname, *files)
2305 with tarfile.open(tmpname) as tar:
2308 support.unlink(tmpname)
2339 tar_name = tmpname + '.' + filetype.suffix
2347 self.make_simple_tarfile(tmpname)
2351 out = self.tarfilecmd(opt, tmpname)
2357 self.make_simple_tarfile(tmpname)
2361 out = self.tarfilecmd(opt, '-e', tmpname)
2367 self.make_simple_tarfile(tmpname)
2370 out = self.tarfilecmd('-e', tmpname, 'spamdir')
2413 with tarfile.open(tmpname, "w") as tar:
2417 self.assertEqual(os.path.getsize(tmpname), 0,
2424 with tarfile.open(tmpname, "w"):
2426 self.assertNotEqual(os.path.getsize(tmpname), 0,
2432 with open(tmpname, "wb") as fobj:
2539 with tarfile.open(tmpname, 'w') as tarfl:
2550 return tmpname