Skip to content

Commit 706a2b0

Browse files
committed
Do not use non-ASCII characters in Python files
Replicates graphql/graphql-js@777c7e9
1 parent ac4ca69 commit 706a2b0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

tests/language/test_lexer.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -352,23 +352,18 @@ def lex_does_not_allow_name_start_after_a_number():
352352
"123abc", "Invalid number, expected digit but got: 'a'.", (1, 4)
353353
)
354354
assert_syntax_error(
355-
"1_1234", "Invalid number, expected digit but got: '_'.", (1, 2)
355+
"1_234", "Invalid number, expected digit but got: '_'.", (1, 2)
356356
)
357357
assert_syntax_error(
358-
"1_1234", "Invalid number, expected digit but got: '_'.", (1, 2)
359-
)
360-
assert_syntax_error(
361-
"1ß",
362-
"Cannot parse the unexpected character 'ß'.",
358+
"1\u00df",
359+
"Cannot parse the unexpected character '\u00df'.",
363360
(1, 2),
364361
)
365362
assert_syntax_error(
366363
"1.23f", "Invalid number, expected digit but got: 'f'.", (1, 5)
367364
)
368365
assert_syntax_error(
369-
"12ß",
370-
"Cannot parse the unexpected character 'ß'.",
371-
(1, 3),
366+
"1.234_5", "Invalid number, expected digit but got: '_'.", (1, 6)
372367
)
373368

374369
# noinspection PyArgumentEqualDefault

0 commit comments

Comments
 (0)