예제 #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)
예제 #2
0
 def test_read_text(self):
     """BytesIteratorIO converts text as bytes."""
     file_obj = BytesIteratorIO(generate_hello_text())
     self.assertEqual(file_obj.read(), HELLO_BYTES)
예제 #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)
예제 #4
0
 def test_read_bytes(self):
     """BytesIteratorIO obviously accepts bytes generator."""
     file_obj = BytesIteratorIO(generate_hello_bytes())
     self.assertEqual(file_obj.read(), HELLO_BYTES)