Lines Matching refs:file
152 # ValueError, just like the corresponding functions on file objects.
154 # Write to a file, open it for reading, then close it.
167 # Open the file for writing, then close it.
180 # Append to the previous file
189 # Bug #1074261 was triggered when reading a file that contained
190 # many, many members. Create such a file and verify that reading it
198 # Try reading the file
352 # RFC 1952 specifies that this is the name of the input file, if any.
354 # file in this field.
404 self.fail("__enter__ on a closed file didn't raise an exception")
417 # Pad the file with zeroes
423 self.assertEqual(d, data1 * 50, "Incorrect data in file")
429 with open(self.filename, 'wb') as file:
430 file.write(data1 * 50)
431 with gzip.GzipFile(self.filename, 'r') as file:
432 self.assertRaises(gzip.BadGzipFile, file.readlines)
513 self.skipTest("Temporary file name needs to be ASCII")
518 # Sanity check that we are actually operating on the right file.
584 # Drop the CRC (4 bytes) and file size (4 bytes).