Home | History | Annotate | Download | only in test

Lines Matching refs:TESTFN2

30 TESTFN2 = TESTFN + "2"
116 for f in (TESTFN2, TemporaryFile(), StringIO()):
144 for f in (TESTFN2, TemporaryFile(), StringIO()):
149 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
153 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
181 for f in (TESTFN2, TemporaryFile(), StringIO()):
249 for f in (TESTFN2, TemporaryFile(), StringIO()):
253 for f in (TESTFN2, TemporaryFile(), StringIO()):
257 for f in (TESTFN2, TemporaryFile(), StringIO()):
261 for f in (TESTFN2, TemporaryFile(), StringIO()):
266 for f in (TESTFN2, TemporaryFile(), StringIO()):
271 for f in (TESTFN2, TemporaryFile(), StringIO()):
276 for f in (TESTFN2, TemporaryFile(), StringIO()):
282 for f in (TESTFN2, TemporaryFile(), StringIO()):
287 for f in (TESTFN2, TemporaryFile(), StringIO()):
292 for f in (TESTFN2, TemporaryFile(), StringIO()):
297 for f in (TESTFN2, TemporaryFile(), StringIO()):
304 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) as zipfp:
308 with zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_DEFLATED) as zipfp:
314 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
317 with zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_STORED) as zipfp:
322 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
325 with zipfile.ZipFile(TESTFN2, "a", zipfile.ZIP_STORED) as zipfp:
334 with open(TESTFN2, 'wb') as f:
337 with zipfile.ZipFile(TESTFN2, "a", zipfile.ZIP_STORED) as zipfp:
340 with open(TESTFN2, 'rb') as f:
346 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
348 with open(TESTFN2, 'a') as f:
350 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
354 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
357 with open(TESTFN2, 'a') as f:
359 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
366 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
374 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
385 with zipfile.ZipFile(TESTFN2, mode="w") as zipfp:
388 with zipfile.ZipFile(TESTFN2, mode="r") as zipfp:
392 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
396 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
414 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
418 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
438 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED) as zipfp:
442 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
496 with zipfile.ZipFile(TESTFN2, 'w', zipfile.ZIP_STORED) as zipfp:
507 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
514 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
521 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
528 with zipfile.ZipFile(TESTFN2, 'r') as zipfp:
533 os.remove(TESTFN2)
536 zipfp = zipfile.ZipFile(TESTFN2, "w")
559 for f in (TESTFN2, TemporaryFile(), StringIO()):
564 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
570 with zipfile.ZipFile(TESTFN2, "r") as zipfp:
577 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
582 with zipfile.ZipFile(TESTFN2, "r") as zipfp2:
590 with zipfile.ZipFile(TESTFN2, "w") as zipfp:
595 unlink(TESTFN2)
625 for f in (TESTFN2, TemporaryFile(), StringIO()):
692 for f in (TESTFN2, TemporaryFile(), StringIO()):
697 for f in (TESTFN2, TemporaryFile(), StringIO()):
701 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_STORED,
705 with zipfile.ZipFile(TESTFN2, "r", zipfile.ZIP_STORED) as zipfp:
711 unlink(TESTFN2)
756 os.mkdir(TESTFN2)
758 with open(os.path.join(TESTFN2, "mod1.py"), "w") as fp:
761 with open(os.path.join(TESTFN2, "mod2.py"), "w") as fp:
764 with open(os.path.join(TESTFN2, "mod2.txt"), "w") as fp:
768 zipfp.writepy(TESTFN2)
776 shutil.rmtree(TESTFN2)
1153 unlink(TESTFN2)
1186 with open(TESTFN2, "wb") as fp:
1188 self.zip2 = zipfile.ZipFile(TESTFN2, "r")
1194 os.unlink(TESTFN2)
1228 unlink(TESTFN2)
1247 for f in (TESTFN2, TemporaryFile(), StringIO()):
1252 for f in (TESTFN2, TemporaryFile(), io.BytesIO()):
1285 for f in (TESTFN2, TemporaryFile(), StringIO()):
1290 for f in (TESTFN2, TemporaryFile(), io.BytesIO()):
1311 for f in (TESTFN2, TemporaryFile(), StringIO()):
1316 for f in (TESTFN2, TemporaryFile(), io.BytesIO()):
1324 with zipfile.ZipFile(TESTFN2, "w", zipfile.ZIP_DEFLATED) as zipfp:
1331 with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
1343 with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
1355 with zipfile.ZipFile(TESTFN2, mode="r") as zipf:
1365 unlink(TESTFN2)
1370 os.mkdir(TESTFN2)
1374 zipf.extractall(TESTFN2)
1375 self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a")))
1376 self.assertTrue(os.path.isdir(os.path.join(TESTFN2, "a", "b")))
1377 self.assertTrue(os.path.exists(os.path.join(TESTFN2, "a", "b", "c")))
1381 os.mkdir(os.path.join(TESTFN2, "a"))
1385 os.mkdir(os.path.join(TESTFN2, "x"))
1387 zipf.write(os.path.join(TESTFN2, "x"), "x")
1391 shutil.rmtree(TESTFN2)
1478 for f in (TESTFN2, TemporaryFile(), StringIO()):
1483 for f in (TESTFN2, TemporaryFile(), StringIO()):
1487 for f in (TESTFN2, TemporaryFile(), StringIO()):
1491 for f in (TESTFN2, TemporaryFile(), StringIO()):
1495 for f in (TESTFN2, TemporaryFile(), StringIO()):
1500 for f in (TESTFN2, TemporaryFile(), StringIO()):
1506 for f in (TESTFN2, TemporaryFile(), StringIO()):
1511 for f in (TESTFN2, TemporaryFile(), StringIO()):
1516 for f in (TESTFN2, TemporaryFile(), StringIO()):
1521 for f in (TESTFN2, TemporaryFile(), StringIO()):
1528 unlink(TESTFN2)