• Home
  • Raw
  • Download

Lines Matching refs:testfile

71     def create_file(self, testfile):  argument
72 f = self.fout = self.module.open(testfile, 'wb')
79 def check_file(self, testfile, nframes, frames): argument
80 f = self.module.open(testfile, 'rb')
107 with open(TESTFN, 'wb') as testfile:
108 testfile.write(b'ababagalamaga')
109 f = self.create_file(testfile)
114 with open(TESTFN, 'rb') as testfile:
115 self.assertEqual(testfile.read(13), b'ababagalamaga')
116 self.check_file(testfile, self.nframes, self.frames)
119 with open(TESTFN, 'wb') as testfile:
120 testfile.write(b'ababagalamaga')
121 f = self.create_file(testfile)
128 with open(TESTFN, 'rb') as testfile:
129 self.assertEqual(testfile.read(13), b'ababagalamaga')
130 self.check_file(testfile, self.nframes, self.frames)
133 with open(TESTFN, 'wb') as testfile:
134 testfile.write(b'ababagalamaga')
135 f = self.create_file(testfile)
140 with open(TESTFN, 'rb') as testfile:
141 self.assertEqual(testfile.read(13), b'ababagalamaga')
142 self.check_file(testfile, self.nframes, self.frames)
150 with UnseekableIO(TESTFN, 'rb') as testfile:
151 self.check_file(testfile, self.nframes, self.frames)
154 with UnseekableIO(TESTFN, 'wb') as testfile:
155 f = self.create_file(testfile)
164 with UnseekableIO(TESTFN, 'wb') as testfile:
165 testfile.write(b'ababagalamaga')
166 f = self.create_file(testfile)
177 with open(TESTFN, 'rb') as testfile:
178 self.assertEqual(testfile.read(13), b'ababagalamaga')
179 self.check_file(testfile, self.nframes + 1, self.frames)
182 with UnseekableIO(TESTFN, 'wb') as testfile:
183 testfile.write(b'ababagalamaga')
184 f = self.create_file(testfile)
195 with open(TESTFN, 'rb') as testfile:
196 self.assertEqual(testfile.read(13), b'ababagalamaga')
198 self.check_file(testfile, self.nframes - 1, self.frames[:-framesize])
214 with open(self.sndfilepath, 'rb') as testfile:
215 f = self.f = self.module.open(testfile)
216 self.assertFalse(testfile.closed)
218 self.assertEqual(testfile.closed, self.close_fd)
219 with open(TESTFN, 'wb') as testfile:
220 fout = self.fout = self.module.open(testfile, 'wb')
221 self.assertFalse(testfile.closed)
224 self.assertEqual(testfile.closed, self.close_fd)
269 with open(TESTFN, 'wb') as testfile:
270 testfile.write(b'ababagalamaga')
272 testfile.write(f.read())
274 with open(TESTFN, 'rb') as testfile:
275 self.assertEqual(testfile.read(13), b'ababagalamaga')
276 f = self.module.open(testfile, 'rb')