|
156 | 156 | Traceback (most recent call last): |
157 | 157 | SyntaxError: cannot assign to conditional expression |
158 | 158 |
|
159 | | ->>> a = 42 if True # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 159 | +>>> a = 42 if True |
160 | 160 | Traceback (most recent call last): |
161 | 161 | SyntaxError: expected 'else' after 'if' expression |
162 | 162 |
|
163 | | ->>> a = (42 if True) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 163 | +>>> a = (42 if True) |
164 | 164 | Traceback (most recent call last): |
165 | 165 | SyntaxError: expected 'else' after 'if' expression |
166 | 166 |
|
167 | | ->>> a = [1, 42 if True, 4] # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 167 | +>>> a = [1, 42 if True, 4] |
168 | 168 | Traceback (most recent call last): |
169 | 169 | SyntaxError: expected 'else' after 'if' expression |
170 | 170 |
|
|
275 | 275 | Traceback (most recent call last): |
276 | 276 | SyntaxError: cannot assign to function call |
277 | 277 |
|
278 | | ->>> with a as b # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 278 | +>>> with a as b |
279 | 279 | Traceback (most recent call last): |
280 | 280 | SyntaxError: expected ':' |
281 | 281 |
|
|
478 | 478 | Traceback (most recent call last): |
479 | 479 | SyntaxError: var-keyword argument cannot have default value |
480 | 480 |
|
481 | | ->>> def foo(a,*a, b, **c, d): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 481 | +>>> def foo(a,*a, b, **c, d): |
482 | 482 | ... pass |
483 | 483 | Traceback (most recent call last): |
484 | 484 | SyntaxError: arguments cannot follow var-keyword argument |
485 | 485 |
|
486 | | ->>> def foo(a,*a, b, **c, d=4): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 486 | +>>> def foo(a,*a, b, **c, d=4): |
487 | 487 | ... pass |
488 | 488 | Traceback (most recent call last): |
489 | 489 | SyntaxError: arguments cannot follow var-keyword argument |
490 | 490 |
|
491 | | ->>> def foo(a,*a, b, **c, *d): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 491 | +>>> def foo(a,*a, b, **c, *d): |
492 | 492 | ... pass |
493 | 493 | Traceback (most recent call last): |
494 | 494 | SyntaxError: arguments cannot follow var-keyword argument |
495 | 495 |
|
496 | | ->>> def foo(a,*a, b, **c, **d): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 496 | +>>> def foo(a,*a, b, **c, **d): |
497 | 497 | ... pass |
498 | 498 | Traceback (most recent call last): |
499 | 499 | SyntaxError: arguments cannot follow var-keyword argument |
500 | 500 |
|
501 | | ->>> def foo(a=1,/,**b,/,c): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 501 | +>>> def foo(a=1,/,**b,/,c): |
502 | 502 | ... pass |
503 | 503 | Traceback (most recent call last): |
504 | 504 | SyntaxError: arguments cannot follow var-keyword argument |
505 | 505 |
|
506 | | ->>> def foo(*b,*d): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 506 | +>>> def foo(*b,*d): |
507 | 507 | ... pass |
508 | 508 | Traceback (most recent call last): |
509 | 509 | SyntaxError: * argument may appear only once |
510 | 510 |
|
511 | | ->>> def foo(a,*b,c,*d,*e,c): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 511 | +>>> def foo(a,*b,c,*d,*e,c): |
512 | 512 | ... pass |
513 | 513 | Traceback (most recent call last): |
514 | 514 | SyntaxError: * argument may appear only once |
515 | 515 |
|
516 | | ->>> def foo(a,b,/,c,*b,c,*d,*e,c): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 516 | +>>> def foo(a,b,/,c,*b,c,*d,*e,c): |
517 | 517 | ... pass |
518 | 518 | Traceback (most recent call last): |
519 | 519 | SyntaxError: * argument may appear only once |
520 | 520 |
|
521 | | ->>> def foo(a,b,/,c,*b,c,*d,**e): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 521 | +>>> def foo(a,b,/,c,*b,c,*d,**e): |
522 | 522 | ... pass |
523 | 523 | Traceback (most recent call last): |
524 | 524 | SyntaxError: * argument may appear only once |
|
583 | 583 | Traceback (most recent call last): |
584 | 584 | SyntaxError: var-keyword argument cannot have default value |
585 | 585 |
|
586 | | ->>> lambda a, *a, b, **c, d: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 586 | +>>> lambda a, *a, b, **c, d: None |
587 | 587 | Traceback (most recent call last): |
588 | 588 | SyntaxError: arguments cannot follow var-keyword argument |
589 | 589 |
|
590 | | ->>> lambda a,*a, b, **c, d=4: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 590 | +>>> lambda a,*a, b, **c, d=4: None |
591 | 591 | Traceback (most recent call last): |
592 | 592 | SyntaxError: arguments cannot follow var-keyword argument |
593 | 593 |
|
594 | | ->>> lambda a,*a, b, **c, *d: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 594 | +>>> lambda a,*a, b, **c, *d: None |
595 | 595 | Traceback (most recent call last): |
596 | 596 | SyntaxError: arguments cannot follow var-keyword argument |
597 | 597 |
|
598 | | ->>> lambda a,*a, b, **c, **d: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 598 | +>>> lambda a,*a, b, **c, **d: None |
599 | 599 | Traceback (most recent call last): |
600 | 600 | SyntaxError: arguments cannot follow var-keyword argument |
601 | 601 |
|
602 | | ->>> lambda a=1,/,**b,/,c: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 602 | +>>> lambda a=1,/,**b,/,c: None |
603 | 603 | Traceback (most recent call last): |
604 | 604 | SyntaxError: arguments cannot follow var-keyword argument |
605 | 605 |
|
606 | | ->>> lambda *b,*d: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 606 | +>>> lambda *b,*d: None |
607 | 607 | Traceback (most recent call last): |
608 | 608 | SyntaxError: * argument may appear only once |
609 | 609 |
|
610 | | ->>> lambda a,*b,c,*d,*e,c: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 610 | +>>> lambda a,*b,c,*d,*e,c: None |
611 | 611 | Traceback (most recent call last): |
612 | 612 | SyntaxError: * argument may appear only once |
613 | 613 |
|
614 | | ->>> lambda a,b,/,c,*b,c,*d,*e,c: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 614 | +>>> lambda a,b,/,c,*b,c,*d,*e,c: None |
615 | 615 | Traceback (most recent call last): |
616 | 616 | SyntaxError: * argument may appear only once |
617 | 617 |
|
618 | | ->>> lambda a,b,/,c,*b,c,*d,**e: None # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 618 | +>>> lambda a,b,/,c,*b,c,*d,**e: None |
619 | 619 | Traceback (most recent call last): |
620 | 620 | SyntaxError: * argument may appear only once |
621 | 621 |
|
|
1093 | 1093 |
|
1094 | 1094 | Missing ':' before suites: |
1095 | 1095 |
|
1096 | | - >>> def f() # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1096 | + >>> def f() |
1097 | 1097 | ... pass |
1098 | 1098 | Traceback (most recent call last): |
1099 | 1099 | SyntaxError: expected ':' |
1100 | 1100 |
|
1101 | | - >>> def f[T]() # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1101 | + >>> def f[T]() |
1102 | 1102 | ... pass |
1103 | 1103 | Traceback (most recent call last): |
1104 | 1104 | SyntaxError: expected ':' |
1105 | 1105 |
|
1106 | | - >>> class A # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1106 | + >>> class A |
1107 | 1107 | ... pass |
1108 | 1108 | Traceback (most recent call last): |
1109 | 1109 | SyntaxError: expected ':' |
1110 | 1110 |
|
1111 | | - >>> class A[T] # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1111 | + >>> class A[T] |
1112 | 1112 | ... pass |
1113 | 1113 | Traceback (most recent call last): |
1114 | 1114 | SyntaxError: expected ':' |
1115 | 1115 |
|
1116 | | - >>> class A[T]() # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1116 | + >>> class A[T]() |
1117 | 1117 | ... pass |
1118 | 1118 | Traceback (most recent call last): |
1119 | 1119 | SyntaxError: expected ':' |
|
1123 | 1123 | Traceback (most recent call last): |
1124 | 1124 | SyntaxError: invalid syntax |
1125 | 1125 |
|
1126 | | - >>> if 1 # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1126 | + >>> if 1 |
1127 | 1127 | ... pass |
1128 | 1128 | ... elif 1: |
1129 | 1129 | ... pass |
|
1132 | 1132 | Traceback (most recent call last): |
1133 | 1133 | SyntaxError: expected ':' |
1134 | 1134 |
|
1135 | | - >>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1135 | + >>> if 1: |
1136 | 1136 | ... pass |
1137 | 1137 | ... elif 1 |
1138 | 1138 | ... pass |
|
1141 | 1141 | Traceback (most recent call last): |
1142 | 1142 | SyntaxError: expected ':' |
1143 | 1143 |
|
1144 | | - >>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1144 | + >>> if 1: |
1145 | 1145 | ... pass |
1146 | 1146 | ... elif 1: |
1147 | 1147 | ... pass |
|
1150 | 1150 | Traceback (most recent call last): |
1151 | 1151 | SyntaxError: expected ':' |
1152 | 1152 |
|
1153 | | - >>> for x in range(10) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1153 | + >>> for x in range(10) |
1154 | 1154 | ... pass |
1155 | 1155 | Traceback (most recent call last): |
1156 | 1156 | SyntaxError: expected ':' |
|
1160 | 1160 | Traceback (most recent call last): |
1161 | 1161 | SyntaxError: invalid syntax |
1162 | 1162 |
|
1163 | | - >>> while True # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1163 | + >>> while True |
1164 | 1164 | ... pass |
1165 | 1165 | Traceback (most recent call last): |
1166 | 1166 | SyntaxError: expected ':' |
1167 | 1167 |
|
1168 | | - >>> with blech as something # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1168 | + >>> with blech as something |
1169 | 1169 | ... pass |
1170 | 1170 | Traceback (most recent call last): |
1171 | 1171 | SyntaxError: expected ':' |
1172 | 1172 |
|
1173 | | - >>> with blech # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1173 | + >>> with blech |
1174 | 1174 | ... pass |
1175 | 1175 | Traceback (most recent call last): |
1176 | 1176 | SyntaxError: expected ':' |
1177 | 1177 |
|
1178 | | - >>> with blech, block as something # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1178 | + >>> with blech, block as something |
1179 | 1179 | ... pass |
1180 | 1180 | Traceback (most recent call last): |
1181 | 1181 | SyntaxError: expected ':' |
1182 | 1182 |
|
1183 | | - >>> with blech, block as something, bluch # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1183 | + >>> with blech, block as something, bluch |
1184 | 1184 | ... pass |
1185 | 1185 | Traceback (most recent call last): |
1186 | 1186 | SyntaxError: expected ':' |
1187 | 1187 |
|
1188 | | - >>> with (blech as something) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1188 | + >>> with (blech as something) |
1189 | 1189 | ... pass |
1190 | 1190 | Traceback (most recent call last): |
1191 | 1191 | SyntaxError: expected ':' |
1192 | 1192 |
|
1193 | | - >>> with (blech) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1193 | + >>> with (blech) |
1194 | 1194 | ... pass |
1195 | 1195 | Traceback (most recent call last): |
1196 | 1196 | SyntaxError: expected ':' |
1197 | 1197 |
|
1198 | | - >>> with (blech, block as something) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1198 | + >>> with (blech, block as something) |
1199 | 1199 | ... pass |
1200 | 1200 | Traceback (most recent call last): |
1201 | 1201 | SyntaxError: expected ':' |
1202 | 1202 |
|
1203 | | - >>> with (blech, block as something, bluch) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1203 | + >>> with (blech, block as something, bluch) |
1204 | 1204 | ... pass |
1205 | 1205 | Traceback (most recent call last): |
1206 | 1206 | SyntaxError: expected ':' |
|
1210 | 1210 | Traceback (most recent call last): |
1211 | 1211 | SyntaxError: invalid syntax. Did you mean 'and'? |
1212 | 1212 |
|
1213 | | - >>> try # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1213 | + >>> try |
1214 | 1214 | ... pass |
1215 | 1215 | Traceback (most recent call last): |
1216 | 1216 | SyntaxError: expected ':' |
1217 | 1217 |
|
1218 | | - >>> try: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1218 | + >>> try: |
1219 | 1219 | ... pass |
1220 | 1220 | ... except |
1221 | 1221 | ... pass |
1222 | 1222 | Traceback (most recent call last): |
1223 | 1223 | SyntaxError: expected ':' |
1224 | 1224 |
|
1225 | | - >>> match x # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1225 | + >>> match x |
1226 | 1226 | ... case list(): |
1227 | 1227 | ... pass |
1228 | 1228 | Traceback (most recent call last): |
|
1234 | 1234 | Traceback (most recent call last): |
1235 | 1235 | SyntaxError: invalid syntax |
1236 | 1236 |
|
1237 | | - >>> match x: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1237 | + >>> match x: |
1238 | 1238 | ... case list() |
1239 | 1239 | ... pass |
1240 | 1240 | Traceback (most recent call last): |
1241 | 1241 | SyntaxError: expected ':' |
1242 | 1242 |
|
1243 | | - >>> match x: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1243 | + >>> match x: |
1244 | 1244 | ... case [y] if y > 0 |
1245 | 1245 | ... pass |
1246 | 1246 | Traceback (most recent call last): |
|
1287 | 1287 |
|
1288 | 1288 | Missing parens after function definition |
1289 | 1289 |
|
1290 | | - >>> def f: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1290 | + >>> def f: |
1291 | 1291 | Traceback (most recent call last): |
1292 | 1292 | SyntaxError: expected '(' |
1293 | 1293 |
|
1294 | | - >>> async def f: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1294 | + >>> async def f: |
1295 | 1295 | Traceback (most recent call last): |
1296 | 1296 | SyntaxError: expected '(' |
1297 | 1297 |
|
1298 | | - >>> def f -> int: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1298 | + >>> def f -> int: |
1299 | 1299 | Traceback (most recent call last): |
1300 | 1300 | SyntaxError: expected '(' |
1301 | 1301 |
|
1302 | | - >>> async def f -> int: # type: int # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1302 | + >>> async def f -> int: # type: int |
1303 | 1303 | Traceback (most recent call last): |
1304 | 1304 | SyntaxError: expected '(' |
1305 | 1305 |
|
1306 | | - >>> async def f[T]: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1306 | + >>> async def f[T]: |
1307 | 1307 | Traceback (most recent call last): |
1308 | 1308 | SyntaxError: expected '(' |
1309 | 1309 |
|
1310 | | - >>> def f[T] -> str: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE |
| 1310 | + >>> def f[T] -> str: |
1311 | 1311 | Traceback (most recent call last): |
1312 | 1312 | SyntaxError: expected '(' |
1313 | 1313 |
|
@@ -3092,7 +3092,6 @@ async def bug(): |
3092 | 3092 | with self.subTest(f"out of range: {n=}"): |
3093 | 3093 | self._check_error(get_code(n), "too many statically nested blocks") |
3094 | 3094 |
|
3095 | | - @unittest.expectedFailure # TODO: RUSTPYTHON |
3096 | 3095 | def test_barry_as_flufl_with_syntax_errors(self): |
3097 | 3096 | # The "barry_as_flufl" rule can produce some "bugs-at-a-distance" if |
3098 | 3097 | # is reading the wrong token in the presence of syntax errors later |
|
0 commit comments