(self)
| 3249 | |
| 3250 | # http://bugs.python.org/issue19609 |
| 3251 | def test_codec_lookup_failure(self): |
| 3252 | msg = "^unknown encoding: {}$".format(self.codec_name) |
| 3253 | with self.assertRaisesRegex(LookupError, msg): |
| 3254 | "str input".encode(self.codec_name) |
| 3255 | with self.assertRaisesRegex(LookupError, msg): |
| 3256 | codecs.encode("str input", self.codec_name) |
| 3257 | with self.assertRaisesRegex(LookupError, msg): |
| 3258 | b"bytes input".decode(self.codec_name) |
| 3259 | with self.assertRaisesRegex(LookupError, msg): |
| 3260 | codecs.decode(b"bytes input", self.codec_name) |
| 3261 | |
| 3262 | def test_unflagged_non_text_codec_handling(self): |
| 3263 | # The stdlib non-text codecs are now marked so they're |
nothing calls this directly
no test coverage detected