(self)
| 1178 | self.assertEqual(decode(b + b'0'), (b + b'0', 2)) |
| 1179 | |
| 1180 | def test_escape(self): |
| 1181 | decode = codecs.escape_decode |
| 1182 | check = coding_checker(self, decode) |
| 1183 | check(b"[\\\n]", b"[]") |
| 1184 | check(br'[\"]', b'["]') |
| 1185 | check(br"[\']", b"[']") |
| 1186 | check(br"[\\]", b"[\\]") |
| 1187 | check(br"[\a]", b"[\x07]") |
| 1188 | check(br"[\b]", b"[\x08]") |
| 1189 | check(br"[\t]", b"[\x09]") |
| 1190 | check(br"[\n]", b"[\x0a]") |
| 1191 | check(br"[\v]", b"[\x0b]") |
| 1192 | check(br"[\f]", b"[\x0c]") |
| 1193 | check(br"[\r]", b"[\x0d]") |
| 1194 | check(br"[\7]", b"[\x07]") |
| 1195 | check(br"[\78]", b"[\x078]") |
| 1196 | check(br"[\41]", b"[!]") |
| 1197 | check(br"[\418]", b"[!8]") |
| 1198 | check(br"[\101]", b"[A]") |
| 1199 | check(br"[\1010]", b"[A0]") |
| 1200 | check(br"[\x41]", b"[A]") |
| 1201 | check(br"[\x410]", b"[A0]") |
| 1202 | |
| 1203 | def test_warnings(self): |
| 1204 | decode = codecs.escape_decode |
nothing calls this directly
no test coverage detected