(self)
| 235 | FileInput(mode=mode) |
| 236 | |
| 237 | def test_stdin_binary_mode(self): |
| 238 | with mock.patch('sys.stdin') as m_stdin: |
| 239 | m_stdin.buffer = BytesIO(b'spam, bacon, sausage, and spam') |
| 240 | fi = FileInput(files=['-'], mode='rb') |
| 241 | lines = list(fi) |
| 242 | self.assertEqual(lines, [b'spam, bacon, sausage, and spam']) |
| 243 | |
| 244 | def test_detached_stdin_binary_mode(self): |
| 245 | orig_stdin = sys.stdin |
nothing calls this directly
no test coverage detected