Lines Matching refs:TESTFN
14 from test.test_support import TESTFN, check_warnings, run_unittest, make_bad_fd
24 self.f = _FileIO(TESTFN, 'w')
29 os.remove(TESTFN)
71 self.f = _FileIO(TESTFN, 'r')
79 self.f = _FileIO(TESTFN, 'rb')
87 self.f = _FileIO(TESTFN, 'rb')
98 self.f = _FileIO(TESTFN, 'r')
121 f = _FileIO(TESTFN, 'r')
252 self.f = _FileIO(TESTFN, 'r')
276 f = _FileIO(TESTFN, "w")
282 f = _FileIO(TESTFN, "r")
288 f = _FileIO(TESTFN, "a+")
295 os.unlink(TESTFN)
321 f = _FileIO(TESTFN, mode)
337 with _FileIO(TESTFN, modes[0]) as f:
340 if os.path.exists(TESTFN):
341 os.unlink(TESTFN)
345 f = _FileIO(str(TESTFN), "w")
347 os.unlink(TESTFN)
352 fn = TESTFN.encode("ascii")
354 self.skipTest('could not encode %r to ascii' % TESTFN)
359 with open(TESTFN, "rb") as f:
362 os.unlink(TESTFN)
387 f = _FileIO(TESTFN, bad_mode)
391 if TESTFN in s or bad_mode not in s:
400 f = _FileIO(TESTFN, 'w')
415 f = _FileIO(TESTFN, 'w')
419 f = _FileIO(TESTFN,'r+')
431 size = os.path.getsize(TESTFN)
438 os.unlink(TESTFN)
442 f = open(TESTFN, 'wb')
445 f = open(TESTFN, 'ab')
448 f = open(TESTFN, 'rb')
454 os.unlink(TESTFN)
507 if os.path.exists(TESTFN):
508 os.unlink(TESTFN)