Lines Matching refs:bytes
56 cls.line_gen = [bytes("Zipfile test line %d. random float: %f\n" %
328 # Issue #9837: ZipExtFile.read() shouldn't return more bytes
684 line_gen = (bytes("Test of zipfile line %d." % i, "ascii")
870 """Generate bytes sequence for a zip with (incomplete) zip64 data.
1100 # bytes are checked to ensure that they line up with the zip spec.
1129 self.assertEqual(ex_len, 16) # 16 bytes of data
1166 # as a regular data descriptor except the sizes are 8 bytes instead of
1170 # in as a zip, this test looks at the raw bytes created to ensure that
1207 self.assertEqual(ex_len, 16) # 16 bytes of data
1230 self.assertEqual(ex_len, 16) # 16 bytes of data
1234 self.assertEqual(dd_usize, file_size) # file size (8 bytes because zip64)
1235 self.assertEqual(dd_csize, file_size) # compressed size (8 bytes because zip64)
1842 """Check that zipfiles with missing bytes at the end raise BadZipFile."""
1849 # - Now create copies of it missing the last N bytes and make sure
1901 # Set the size of the central directory bytes to become 1,
2089 # Issue 1710703: Check that opening a file with less than 22 bytes
2128 """If an extra field in the header is less than 4 bytes, skip it."""
2431 expected_msg = "pwd: expected bytes, got str"
3289 write bytes or text to it.
3597 # Each name is 1 Han character encoding to 2 bytes in Shift JIS.
3600 # Data elements are encoded bytes (ascii, utf-8, shift_jis).
3731 # to 3 bytes at the end of the extra will be passed through as they