(self)
| 242 | self.assertEqual(lines, [b'spam, bacon, sausage, and spam']) |
| 243 | |
| 244 | def test_detached_stdin_binary_mode(self): |
| 245 | orig_stdin = sys.stdin |
| 246 | try: |
| 247 | sys.stdin = BytesIO(b'spam, bacon, sausage, and spam') |
| 248 | self.assertNotHasAttr(sys.stdin, 'buffer') |
| 249 | fi = FileInput(files=['-'], mode='rb') |
| 250 | lines = list(fi) |
| 251 | self.assertEqual(lines, [b'spam, bacon, sausage, and spam']) |
| 252 | finally: |
| 253 | sys.stdin = orig_stdin |
| 254 | |
| 255 | def test_file_opening_hook(self): |
| 256 | try: |
nothing calls this directly
no test coverage detected