(self)
| 200 | self.check_io_encoding('_pyio') |
| 201 | |
| 202 | def test_locale_getpreferredencoding(self): |
| 203 | code = 'import locale; print(locale.getpreferredencoding(False), locale.getpreferredencoding(True))' |
| 204 | out = self.get_output('-X', 'utf8', '-c', code) |
| 205 | self.assertEqual(out, 'utf-8 utf-8') |
| 206 | |
| 207 | for loc in POSIX_LOCALES: |
| 208 | with self.subTest(LC_ALL=loc): |
| 209 | out = self.get_output('-X', 'utf8', '-c', code, LC_ALL=loc) |
| 210 | self.assertEqual(out, 'utf-8 utf-8') |
| 211 | |
| 212 | @unittest.skipIf(MS_WINDOWS, 'test specific to Unix') |
| 213 | def test_cmd_line(self): |
nothing calls this directly
no test coverage detected