Skip to content

Commit a403341

Browse files
youknowonezzarbttooclaude
authored
Take SyntaxError messages and ranges from the parser (#8983)
* Match CPython's SyntaxError range for unparenthesized `except` types CPython's `invalid_except_stmt` rule raises the error only once the whole clause has matched, and reports a range that starts at the first exception type and ends at the `:` closing the clause, so it covers the `as NAME` part as well: invalid_except_stmt: | 'except' a=expression ',' expressions 'as' NAME ':' { RAISE_SYNTAX_ERROR_STARTING_FROM(a, "multiple exception types must be parenthesized when using 'as'") } The parser reports the exception types alone, so look up that `:` in the source and widen the range to match. Only `as NAME` may follow the exception types, which is why the first `:` after them is the one closing the clause. try: pass except A, B, C as e: pass CPython 3.14: ('x.py', 3, 8, 'except A, B, C as e:\n', 3, 20) before: ('x.py', 3, 8, 'except A, B, C as e:\n', 3, 15) Fixes #8496 Co-Authored-By: Claude Opus 5 <[email protected]> * Clarify that the `except` error range stops before the closing colon `invalid_except_stmt_end` returns the exclusive end of the range, so the column it yields is the one the `:` sits on even though the `:` is not part of the range. The previous "ending at the `:`" wording read as if the colon were included, which invites an off-by-one "fix". Comments only; no behavior change. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Fix the `except ... as` error column for non-ASCII names and line joins `invalid_except_stmt_end` recovers the end of CPython's range by scanning the source, which has to redo by hand what CPython gets from its tokenizer: - The column was the byte distance from the line start, but `end_offset` is a character column. `except Ä, B as e:` reported 18 instead of 17. CPython converts explicitly, in `_PyPegen_byte_offset_to_character_offset`. - The colon scan already spans explicit line joins, but the `as` check ran on the raw slice, so a `\` before `as` left the range unextended. `except A, B \` + `as exc:` reported (3, 12) instead of (4, 7). Add regression cases to `syntax_invalid.py` covering both, plus the whitespace, `except*` and line-join placements that already worked. All values are verified against CPython 3.14. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * Update the Ruff fork to 0.16.10 Point the rustpython-ruff_* dependencies at the 0.16.10-rustpython tag of the RustPython Ruff fork and port to its AST changes: `ExprCompare` stores all operands in `operands`, call arguments use `ThinVec`, dict comprehension generators and f-string elements are boxed slices, `FStringValue` iterates `FStringPartRef`, and `TokenKind::Name` is now `TokenKind::Identifier`. Assisted-by: Grok:grok-4.6 Assisted-by: Claude Code:claude-opus-5-5 * Drop the source scan for the `except ... as` error range The parser now reports the unparenthesized exception types error with a range ending at the `:` that closes the clause, so `invalid_except_stmt_end` and the message match that widened the range are removed. Assisted-by: Claude Code:claude-opus-5-5 * Take parse error messages from the parser as they are The Ruff fork now emits the final message texts, so `vm_new.rs` no longer rewrites parse error messages by matching their text and no longer lowercases the first character of every message. `analyze_compile_error` keeps only the caret narrowing for starred expressions and the line number in the unterminated string message. The compiler matches the new lowercase texts for indented block and mixed bytes literal errors. The fork is referenced by revision until it is published. Assisted-by: Claude Code:claude-opus-5-5 * Take starred and bytes literal error ranges from the parser The Ruff fork now reports misplaced starred expressions at the `*` and non-ASCII bytes literal errors over the whole literal. `vm_new.rs` drops `narrow_caret` together with `SyntaxErrorInfo`, which only carried the message after that, and the compiler drops `bytes_literal_span`. Assisted-by: Claude Code:claude-opus-5-5 * Take indentation error kinds and positions from the parser The Ruff fork now reports `TabError` and `TooDeepIndentation` as their own lexer errors and places indentation and line continuation errors itself. `vm_new.rs` picks TabError or IndentationError from the error kind instead of scanning the source for mixed indentation, drops the TabError message override, and sets the end offset of tokenizer errors to 0 or -1 by kind. The compiler drops the line-end relocation of unindent errors and the line continuation rewrite. `_tokenize` raises TabError and depth errors for the token they replace, also for sources containing tabs. Remove expectedFailure from test_tokenize.test_max_indent and four test_tabnanny tests. Assisted-by: Claude Code:claude-opus-5-5 * Take unterminated string messages from the parser The Ruff fork's unterminated string errors now include the detected line and are reported at the start of the string. `vm_new.rs` drops its message override for `UnclosedStringError`, and the shell continues a line on an unterminated triple-quoted string by the error's `triple_quoted` flag instead of reading the quotes from the source. Assisted-by: Claude Code:claude-opus-5-5 * Take bracket errors and tokenizer error priority from the parser Bump the ruff fork, which now reports unmatched, mismatched, unclosed and too deeply nested brackets and decides whether a tokenizer error replaces the parser's first error. Remove the bracket, unterminated string and nesting depth source scanners and `pre_parse_source_error`. A tokenizer error from the parser now wins over source scanner diagnostics found after it. An unclosed bracket is incomplete input only when the parser reports it as such, and other tokenizer errors end where they start. Remove the expected failure markers from test_unicode_identifiers test_invalid and the `import ä £` doctest in test_syntax. Assisted-by: Claude Code:claude-opus-5-5 * Take number literal, string prefix and non-printable errors from the parser Bump the ruff fork, which now reports malformed number literals, incompatible string prefixes and non-printable characters itself. Remove the number literal, string prefix and non-printable character source scanners and the override classes that ranked them. Leading zero and string prefix errors keep their range instead of ending where they start. Assisted-by: Claude Code:claude-opus-5-5 * Take the missing indented block error from the parser Bump the ruff fork, which now reports `ExpectedIndentedBlock` with the clause and the line of its header keyword. Remove the message rewrite that derived the clause and line from the source. The VM chooses IndentationError or incomplete input by the error variant instead of its message. Assisted-by: Claude Code:claude-opus-5-5 * Take binding target errors from the parser Bump the ruff fork, which now names the invalid expression in assignment, augmented assignment, delete, `for`, `with`, import, pattern and `except` target errors. Remove the source scanners for those targets and the message rewrites of `InvalidAssignmentTarget` and `InvalidNamedAssignmentTarget`. Remove the expected failure markers from test_syntax doctests that now pass. Assisted-by: Claude Code:claude-opus-5-5 * Take parameter, argument, star, comma and dictionary errors from the parser Bump the ruff fork to 36919b62fa. Remove the source scanners for type parameters, parameter lists, star annotations, call arguments, def type parameters, parenthesized groups, missing commas and dictionary items. Set end_offset 0 for ExpectedColonAfterDictionaryKey. Remove 14 EXPECTED_FAILURE markers in test_syntax and test_unpack_ex. Assisted-by: Claude Code:claude-opus-5-5 * Take expression errors from the parser Bump the ruff fork to 4f922d2124. Remove the source scanners for comprehensions, collection and condition assignments, expressions between strings, named expression targets, missing `in` after for-loop variables and statements in `if` expressions. Remove the now passing expected failure markers in test_syntax and test_named_expressions. Assisted-by: Claude Code:claude-opus-5-5 * Take statement errors from the parser Bump the ruff fork to c7f6594ed6. Remove the source scanners for standalone except, `import ... from`, `**_` mapping rests, `elif` after `else` and mixed except handlers, and the post-parse scanners for call arguments, match targets, yield after a comma and parenthesized star imports. Assisted-by: Claude Code:claude-opus-5-5 * Take string and f-string errors from the parser Bump the ruff fork to 6b46d0dfc8. Remove the source scanners for malformed `\N` escapes, f-string and t-string replacement fields, mixed t-string literals and `print`/`exec` statements, and the override plumbing they used. Drop the `f'{x'; '` case from the compiler test, whose expected message differs from CPython 3.14. Assisted-by: Claude Code:claude-opus-5-5 * Restore the bracket depth check and fix incomplete unclosed strings Restore `pre_parse_source_error`, which rejects bracket nesting past 200 levels before parsing. The parser reports the same error but still builds the full tree, which overflows the native stack when dropped. Remove the VM's unclosed string scanner, which ignored the mode and treated `'abc` in exec mode as incomplete input. The compiler's check now skips escaped newlines. Assisted-by: Claude Code:claude-opus-5-5 * Report multiple statements before later errors in single mode In single mode, when the first statement is a simple statement, report code after its line as multiple statements before any error found later, at the newline token or the comment before it. This replaces the multiple statements check on the parsed body and also applies to `ast.parse(mode='single')`. An unclosed string that follows an earlier syntax error is no longer incomplete input. The bracket depth error range is now empty. Assisted-by: Claude Code:claude-opus-5-5 * Update the Ruff fork for parser speed and starred annotations Bump the ruff fork to 8b59b85344, which skips the tokenizer error pass when parsing finds no errors, stops allocating for every identifier's string prefix check, and reports `def f(*args: *b = ...)` as invalid syntax. Remove expected failure markers from test_code_module test_indentation_error and test_sysexcepthook_indentation_error, and from test_dictcomps test_illegal_assignment. Assisted-by: Claude Code:claude-opus-5-5 * Use the published Ruff fork 0.16.10 crates Switch the rustpython-ruff_* dependencies from the git revision to the 0.16.10 crates.io release, published from the same commit (8b59b85344). Assisted-by: Claude Code:claude-opus-5-5 --------- Co-authored-by: zzarbttoo <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
1 parent 4b6ad58 commit a403341

25 files changed

Lines changed: 753 additions & 7039 deletions

‎Cargo.lock‎

Lines changed: 20 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎Cargo.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ rustpython-wtf8 = { path = "crates/wtf8", version = "0.6.1" }
188188
rustpython-doc = { path = "crates/doc", version = "0.6.1" }
189189

190190
# Use the RustPython Ruff fork for RustPython public `_ast` metadata.
191-
ruff_python_parser = { package = "rustpython-ruff_python_parser", version = "0.16.5" }
192-
ruff_python_ast = { package = "rustpython-ruff_python_ast", version = "0.16.5" }
193-
ruff_text_size = { package = "rustpython-ruff_text_size", version = "0.16.5" }
194-
ruff_source_file = { package = "rustpython-ruff_source_file", version = "0.16.5" }
191+
ruff_python_parser = { package = "rustpython-ruff_python_parser", version = "0.16.10" }
192+
ruff_python_ast = { package = "rustpython-ruff_python_ast", version = "0.16.10" }
193+
ruff_text_size = { package = "rustpython-ruff_text_size", version = "0.16.10" }
194+
ruff_source_file = { package = "rustpython-ruff_source_file", version = "0.16.10" }
195195

196196
der = { version = "0.8", features = ["alloc", "oid", "pem", "zeroize"] }
197197
phf = { version = "0.14.0", default-features = false, features = ["macros"]}

‎Lib/test/test_code_module.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def test_syntax_error(self):
111111
self.assertIsNone(self.sysmod.last_value.__traceback__)
112112
self.assertIs(self.sysmod.last_exc, self.sysmod.last_value)
113113

114-
@unittest.expectedFailure # TODO: RUSTPYTHON; - 'IndentationError: unexpected indentation']
115114
def test_indentation_error(self):
116115
self.infunc.side_effect = [" 1", EOFError('Finished')]
117116
self.console.interact()
@@ -187,7 +186,6 @@ def test_sysexcepthook_syntax_error(self):
187186
' ^\n',
188187
'SyntaxError: invalid syntax\n'])
189188

190-
@unittest.expectedFailure # TODO: RUSTPYTHON; + 'IndentationError: unexpected indent\n']
191189
def test_sysexcepthook_indentation_error(self):
192190
self.infunc.side_effect = [" 1", EOFError('Finished')]
193191
hook = mock.Mock()

‎Lib/test/test_dictcomps.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ def test_local_visibility(self):
7575
self.assertEqual(actual, expected)
7676
self.assertEqual(v, "Local variable")
7777

78-
@unittest.expectedFailure # TODO: RUSTPYTHON
7978
def test_illegal_assignment(self):
8079
with self.assertRaisesRegex(SyntaxError, "cannot assign"):
8180
compile("{x: y for y, x in ((1, 2), (3, 4))} = 5", "<test>",

‎Lib/test/test_fstring.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,6 @@ def __format__(self, spec):
865865
x = X()
866866
self.assertEqual(f'{x} {x}', '1 2')
867867

868-
@unittest.expectedFailure # TODO: RUSTPYTHON
869868
def test_missing_expression(self):
870869
self.assertAllRaise(SyntaxError,
871870
"f-string: valid expression required before '}'",

‎Lib/test/test_named_expressions.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ def test_named_expression_invalid_16(self):
9898
with self.assertRaisesRegex(SyntaxError, "invalid syntax"):
9999
exec(code, {}, {})
100100

101-
@unittest.expectedFailure # TODO: RUSTPYTHON
102101
def test_named_expression_invalid_17(self):
103102
code = "[i := 0, j := 1 for i, j in [(1, 2), (3, 4)]]"
104103

‎Lib/test/test_syntax.py‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@
326326
327327
# Incorrectly closed strings
328328
329-
>>> "The interesting object "The important object" is very important" # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
329+
>>> "The interesting object "The important object" is very important"
330330
Traceback (most recent call last):
331331
SyntaxError: invalid syntax. Is this intended to be part of the string?
332332
@@ -423,7 +423,7 @@
423423
Traceback (most recent call last):
424424
SyntaxError: invalid syntax
425425
426-
>>> def foo(/,a,b=,c): # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
426+
>>> def foo(/,a,b=,c):
427427
... pass
428428
Traceback (most recent call last):
429429
SyntaxError: at least one argument must precede /
@@ -1045,23 +1045,23 @@
10451045
a complex 'if' (one with 'elif') would fail to notice an invalid suite,
10461046
leading to spurious errors.
10471047
1048-
>>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1048+
>>> if 1:
10491049
... x() = 1
10501050
... elif 1:
10511051
... pass
10521052
Traceback (most recent call last):
10531053
...
10541054
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
10551055
1056-
>>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1056+
>>> if 1:
10571057
... pass
10581058
... elif 1:
10591059
... x() = 1
10601060
Traceback (most recent call last):
10611061
...
10621062
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
10631063
1064-
>>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1064+
>>> if 1:
10651065
... x() = 1
10661066
... elif 1:
10671067
... pass
@@ -1071,7 +1071,7 @@
10711071
...
10721072
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
10731073
1074-
>>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1074+
>>> if 1:
10751075
... pass
10761076
... elif 1:
10771077
... x() = 1
@@ -1081,7 +1081,7 @@
10811081
...
10821082
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?
10831083
1084-
>>> if 1: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1084+
>>> if 1:
10851085
... pass
10861086
... elif 1:
10871087
... pass
@@ -1185,7 +1185,7 @@
11851185
Traceback (most recent call last):
11861186
SyntaxError: expected ':'
11871187
1188-
>>> with (blech as something) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1188+
>>> with (blech as something)
11891189
... pass
11901190
Traceback (most recent call last):
11911191
SyntaxError: expected ':'
@@ -1195,12 +1195,12 @@
11951195
Traceback (most recent call last):
11961196
SyntaxError: expected ':'
11971197
1198-
>>> with (blech, block as something) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1198+
>>> with (blech, block as something)
11991199
... pass
12001200
Traceback (most recent call last):
12011201
SyntaxError: expected ':'
12021202
1203-
>>> with (blech, block as something, bluch) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1203+
>>> with (blech, block as something, bluch)
12041204
... pass
12051205
Traceback (most recent call last):
12061206
SyntaxError: expected ':'
@@ -1464,7 +1464,7 @@
14641464
Traceback (most recent call last):
14651465
SyntaxError: invalid syntax
14661466
1467-
>>> dict(x=34, (x for x in range 10), 1); x $ y # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
1467+
>>> dict(x=34, (x for x in range 10), 1); x $ y
14681468
Traceback (most recent call last):
14691469
SyntaxError: invalid syntax
14701470
@@ -2077,26 +2077,26 @@
20772077
Traceback (most recent call last):
20782078
SyntaxError: cannot use literal as import target
20792079
2080-
>>> from a import (b as c.d) # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2080+
>>> from a import (b as c.d)
20812081
Traceback (most recent call last):
20822082
SyntaxError: cannot use attribute as import target
20832083
20842084
>>> from a import b as 1
20852085
Traceback (most recent call last):
20862086
SyntaxError: cannot use literal as import target
20872087
2088-
>>> from a import ( # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2088+
>>> from a import (
20892089
... b as f())
20902090
Traceback (most recent call last):
20912091
SyntaxError: cannot use function call as import target
20922092
2093-
>>> from a import ( # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2093+
>>> from a import (
20942094
... b as [],
20952095
... )
20962096
Traceback (most recent call last):
20972097
SyntaxError: cannot use list as import target
20982098
2099-
>>> from a import ( # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2099+
>>> from a import (
21002100
... b,
21012101
... c as ()
21022102
... )
@@ -2233,7 +2233,7 @@
22332233
Traceback (most recent call last):
22342234
SyntaxError: cannot assign to __debug__
22352235
2236-
>>> import ä £ # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2236+
>>> import ä £
22372237
Traceback (most recent call last):
22382238
SyntaxError: invalid character '£' (U+00A3)
22392239
@@ -2245,7 +2245,7 @@
22452245
Traceback (most recent call last):
22462246
SyntaxError: cannot use '_' as a target
22472247
2248-
>>> match ...: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2248+
>>> match ...:
22492249
... case 42 as 1+2+4:
22502250
... ...
22512251
Traceback (most recent call last):
@@ -2263,13 +2263,13 @@
22632263
Traceback (most recent call last):
22642264
SyntaxError: cannot use tuple as pattern target
22652265
2266-
>>> match ...: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2266+
>>> match ...:
22672267
... case 42 as (a + 1):
22682268
... ...
22692269
Traceback (most recent call last):
22702270
SyntaxError: cannot use expression as pattern target
22712271
2272-
>>> match ...: # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2272+
>>> match ...:
22732273
... case (32 as x) | (42 as a()):
22742274
... ...
22752275
Traceback (most recent call last):
@@ -2375,7 +2375,7 @@
23752375
23762376
A[*:] and A[:*]
23772377
2378-
>>> A[*:] # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2378+
>>> A[*:]
23792379
Traceback (most recent call last):
23802380
...
23812381
SyntaxError: Invalid star expression
@@ -2386,7 +2386,7 @@
23862386
23872387
A[*]
23882388
2389-
>>> A[*] # TODO: RUSTPYTHON; Wrong error message # doctest: +EXPECTED_FAILURE
2389+
>>> A[*]
23902390
Traceback (most recent call last):
23912391
...
23922392
SyntaxError: Invalid star expression

‎Lib/test/test_tabnanny.py‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def test_when_tokenize_tokenerror(self):
217217
with self.assertRaises(SystemExit):
218218
self.verify_tabnanny_check(file_path, err=err)
219219

220-
@unittest.expectedFailure # TODO: RUSTPYTHON; A python source code file eligible for raising `tabnanny.NannyNag`.
221220
def test_when_nannynag_error_verbose(self):
222221
"""A python source code file eligible for raising `tabnanny.NannyNag`.
223222
@@ -231,7 +230,6 @@ def test_when_nannynag_error_verbose(self):
231230
tabnanny.verbose = 1
232231
self.verify_tabnanny_check(file_path, out=out)
233232

234-
@unittest.expectedFailure # TODO: RUSTPYTHON; A python source code file eligible for raising `tabnanny.NannyNag`.
235233
def test_when_nannynag_error(self):
236234
"""A python source code file eligible for raising `tabnanny.NannyNag`."""
237235
with TemporaryPyFile(SOURCE_CODES["nannynag_errored"]) as file_path:
@@ -341,7 +339,6 @@ def test_quiet_flag(self):
341339
stdout = f"{file_path}\n"
342340
self.validate_cmd("-q", file_path, stdout=stdout)
343341

344-
@unittest.expectedFailure # TODO: RUSTPYTHON
345342
def test_verbose_mode(self):
346343
"""Should display more error information if verbose mode is on."""
347344
with TemporaryPyFile(SOURCE_CODES["nannynag_errored"]) as path:
@@ -350,7 +347,6 @@ def test_verbose_mode(self):
350347
).strip()
351348
self.validate_cmd("-v", path, stdout=stdout, partial=True)
352349

353-
@unittest.expectedFailure # TODO: RUSTPYTHON
354350
def test_double_verbose_mode(self):
355351
"""Should display detailed error information if double verbose is on."""
356352
with TemporaryPyFile(SOURCE_CODES["nannynag_errored"]) as path:

‎Lib/test/test_tokenize.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3193,7 +3193,6 @@ def get_tokens(string):
31933193
with self.subTest(case=case):
31943194
self.assertRaises(tokenize.TokenError, get_tokens, case)
31953195

3196-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: IndentationError not raised by <lambda>
31973196
@support.skip_wasi_stack_overflow()
31983197
def test_max_indent(self):
31993198
MAXINDENT = 100

‎Lib/test/test_unicode_identifiers.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def test_non_bmp_normalized(self):
1717
𝔘𝔫𝔦𝔠𝔬𝔡𝔢 = 1
1818
self.assertIn("Unicode", dir())
1919

20-
@unittest.expectedFailure # TODO: RUSTPYTHON
2120
def test_invalid(self):
2221
try:
2322
from test.tokenizedata import badsyntax_3131 # noqa: F401

0 commit comments

Comments
 (0)