Beispiel #1
0
 def test_read_text(self):
     """BytesIteratorIO converts text as bytes."""
     file_obj = BytesIteratorIO(generate_hello_text())
     self.assertEqual(file_obj.read(), HELLO_BYTES)
 def test_read_text(self):
     """BytesIteratorIO converts text as bytes."""
     file_obj = BytesIteratorIO(generate_hello_text())
     self.assertEqual(file_obj.read(), HELLO_BYTES)
Beispiel #3
0
 def test_read_bytes(self):
     """BytesIteratorIO obviously accepts bytes generator."""
     file_obj = BytesIteratorIO(generate_hello_bytes())
     self.assertEqual(file_obj.read(), HELLO_BYTES)
 def test_read_bytes(self):
     """BytesIteratorIO obviously accepts bytes generator."""
     file_obj = BytesIteratorIO(generate_hello_bytes())
     self.assertEqual(file_obj.read(), HELLO_BYTES)