Lines Matching refs:fd
259 with io.BytesIO(data) as fd:
260 self.assertTrue(cbr._find_and_read_header(fd, len(data)))
261 pos = fd.tell()
262 hdr_data = fd.read(cbfs_util.FILE_HEADER_LEN)
349 with io.BytesIO(data) as fd:
350 self.assertTrue(cbr._find_and_read_header(fd, len(data)))
351 pos = fd.tell()
356 with io.BytesIO(newdata) as fd:
357 fd.seek(pos)
358 self.assertEqual(False, cbr._read_next_file(fd))
370 with io.BytesIO(data) as fd:
371 self.assertTrue(cbr._find_and_read_header(fd, len(data)))
372 pos = fd.tell()
378 with io.BytesIO(newdata) as fd:
379 fd.seek(pos)
380 self.assertEqual(False, cbr._read_next_file(fd))
411 with io.BytesIO(data) as fd:
413 pos = fd.tell()
414 tag, = struct.unpack('>I', fd.read(4))
436 with io.BytesIO(data) as fd:
437 self.assertTrue(cbr._find_and_read_header(fd, len(data)))
438 pos = fd.tell()
446 with io.BytesIO(newdata) as fd:
447 fd.seek(pos)
448 self.assertEqual(False, cbr._read_next_file(fd))