(self)
| 1197 | self.assertIs(when_skipped, when_not_skipped, message) |
| 1198 | |
| 1199 | def test_skipitem_with_suffix(self): |
| 1200 | parse = _testcapi.parse_tuple_and_keywords |
| 1201 | empty_tuple = () |
| 1202 | tuple_1 = (0,) |
| 1203 | dict_b = {'b':1} |
| 1204 | keywords = ["a", "b"] |
| 1205 | |
| 1206 | supported = ('s#', 's*', 'z#', 'z*', 'y#', 'y*', 'w*') |
| 1207 | for c in string.ascii_letters: |
| 1208 | for c2 in '#*': |
| 1209 | f = c + c2 |
| 1210 | with self.subTest(format=f): |
| 1211 | optional_format = "|" + f + "i" |
| 1212 | if f in supported: |
| 1213 | parse(empty_tuple, dict_b, optional_format, keywords) |
| 1214 | else: |
| 1215 | with self.assertRaisesRegex(SystemError, |
| 1216 | 'impossible<bad format char>'): |
| 1217 | parse(empty_tuple, dict_b, optional_format, keywords) |
| 1218 | |
| 1219 | for c in map(chr, range(32, 128)): |
| 1220 | f = 'e' + c |
| 1221 | optional_format = "|" + f + "i" |
| 1222 | with self.subTest(format=f): |
| 1223 | if c in 'st': |
| 1224 | parse(empty_tuple, dict_b, optional_format, keywords) |
| 1225 | else: |
| 1226 | with self.assertRaisesRegex(SystemError, |
| 1227 | 'impossible<bad format char>'): |
| 1228 | parse(empty_tuple, dict_b, optional_format, keywords) |
| 1229 | |
| 1230 | |
| 1231 | class ParseTupleAndKeywords_Test(unittest.TestCase): |
nothing calls this directly
no test coverage detected