(self)
| 667 | codecs.lookup(enc) |
| 668 | |
| 669 | def test_getencoding_fallback(self): |
| 670 | # When _locale.getencoding() is missing, locale.getencoding() uses |
| 671 | # the Python filesystem |
| 672 | encoding = 'FALLBACK_ENCODING' |
| 673 | with mock.patch.object(sys, 'getfilesystemencoding', |
| 674 | return_value=encoding): |
| 675 | locale_fallback = import_fresh_module('locale', blocked=['_locale']) |
| 676 | self.assertEqual(locale_fallback.getencoding(), encoding) |
| 677 | |
| 678 | def test_getpreferredencoding(self): |
| 679 | # Invoke getpreferredencoding to make sure it does not cause exceptions. |
nothing calls this directly
no test coverage detected