Skip to content

Commit 476243d

Browse files
committed
add tests with space
1 parent 92e502a commit 476243d

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lib/test/test_syntax.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3525,6 +3525,26 @@ def test_double_pipe(self):
35253525
end_offset=5,
35263526
)
35273527

3528+
def test_ampersand_with_space(self):
3529+
self._check_error(
3530+
"a & & b",
3531+
"invalid syntax",
3532+
lineno=1,
3533+
end_lineno=1,
3534+
offset=5,
3535+
end_offset=6,
3536+
)
3537+
3538+
def test_pipe_with_space(self):
3539+
self._check_error(
3540+
"a | | b",
3541+
"invalid syntax",
3542+
lineno=1,
3543+
end_lineno=1,
3544+
offset=5,
3545+
end_offset=6,
3546+
)
3547+
35283548

35293549
class LazyImportRestrictionTestCase(SyntaxErrorTestCase):
35303550
"""Test syntax restrictions for lazy imports."""

0 commit comments

Comments
 (0)