Skip to content

Commit 02f650a

Browse files
committed
Add error location assertions for && and ||
1 parent e309e5e commit 02f650a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lib/test/test_syntax.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3509,12 +3509,20 @@ def test_double_ampersand(self):
35093509
self._check_error(
35103510
"a && b",
35113511
"Maybe you meant 'and' or '&' instead of '&&'",
3512+
lineno=1,
3513+
end_lineno=1,
3514+
offset=3,
3515+
end_offset=5,
35123516
)
35133517

35143518
def test_double_pipe(self):
35153519
self._check_error(
35163520
"a || b",
35173521
"Maybe you meant 'or' or '|' instead of '||'",
3522+
lineno=1,
3523+
end_lineno=1,
3524+
offset=3,
3525+
end_offset=5,
35183526
)
35193527

35203528

0 commit comments

Comments
 (0)