Lines Matching defs:bytes
10 # * test_largefile - tests operations on a file greater than 2**32 bytes
54 bytes = support.py3k_bytes
73 self._write_stack.append(bytes(b))
229 b = bytes(b)
399 print("It requires %d bytes and a long time." % self.LARGE,
899 # Write out many bytes with exactly the same number of 0's,
905 s = bytes(bytearray(l))
934 c = bytes(bytearray([i]))
1058 # At least (total - 8) bytes were implicitly flushed, perhaps more
1064 contents = bytes(range(256)) * 1000
1116 # 8 bytes will be written, 8 will be buffered and the rest will be lost
1130 # Previously buffered bytes were flushed
1197 # Write out many bytes from many threads and test they were
1200 contents = bytes(range(256)) * N
1240 self.assertEqual(s.count(bytes([i])), N)
1506 return bytes(b[:n])
1691 # - A single output character can correspond to many bytes of input.
1692 # - The number of input bytes to complete the character can be
1694 # - The number of input bytes can vary depending on previous input.
1732 return bytes(self.buffer), i*100 + o
1749 else: # fixed-length, terminate after self.i bytes
1965 # XXX: str.encode() should return bytes
1966 data = bytes(''.join(input_lines).encode(encoding))
2151 prefix = bytes(u_prefix.encode("utf-8"))
2154 suffix = bytes(u_suffix.encode("utf-8"))
2443 # Crash when underlying read() returns non-bytes
2604 # rather than bytes input
2810 msg = bytes([i % 26 + 97]) * N
2861 def check_interrupted_write(self, item, bytes, **fdopen_kwargs):
2888 self.assertEqual(read_results, [bytes[0:1], bytes[1:2]])