(self, text)
| 166 | self.assertEqual(f.write(data), len(data)) |
| 167 | |
| 168 | def assertStdinRoundTrip(self, text): |
| 169 | stdin = open('CONIN$', 'r') |
| 170 | old_stdin = sys.stdin |
| 171 | try: |
| 172 | sys.stdin = stdin |
| 173 | write_input( |
| 174 | stdin.buffer.raw, |
| 175 | (text + '\r\n').encode('utf-16-le', 'surrogatepass') |
| 176 | ) |
| 177 | actual = input() |
| 178 | finally: |
| 179 | sys.stdin = old_stdin |
| 180 | self.assertEqual(actual, text) |
| 181 | |
| 182 | @requires_resource('console') |
| 183 | def test_input(self): |
no test coverage detected