(self)
| 158 | 'stderr: utf-8/backslashreplace']) |
| 159 | |
| 160 | def test_io(self): |
| 161 | code = textwrap.dedent(''' |
| 162 | import sys |
| 163 | filename = sys.argv[1] |
| 164 | with open(filename) as fp: |
| 165 | print(f"{fp.encoding}/{fp.errors}") |
| 166 | ''') |
| 167 | filename = __file__ |
| 168 | |
| 169 | out = self.get_output('-c', code, filename, PYTHONUTF8='1') |
| 170 | self.assertEqual(out.lower(), 'utf-8/strict') |
| 171 | |
| 172 | def _check_io_encoding(self, module, encoding=None, errors=None): |
| 173 | filename = __file__ |
nothing calls this directly
no test coverage detected