(self)
| 1861 | getattr(codecs, api) |
| 1862 | |
| 1863 | def test_open(self): |
| 1864 | self.addCleanup(os_helper.unlink, os_helper.TESTFN) |
| 1865 | for mode in ('w', 'r', 'r+', 'w+', 'a', 'a+'): |
| 1866 | with self.subTest(mode), self.assertWarns(DeprecationWarning): |
| 1867 | with codecs.open(os_helper.TESTFN, mode, 'ascii') as file: |
| 1868 | self.assertIsInstance(file, codecs.StreamReaderWriter) |
| 1869 | |
| 1870 | def test_undefined(self): |
| 1871 | self.assertRaises(UnicodeError, codecs.encode, 'abc', 'undefined') |
nothing calls this directly
no test coverage detected