Skip to content

Commit 8292644

Browse files
asottilenicoddemus
authored andcommitted
Allow multiple positions for the SyntaxError in pypy3.6
1 parent 96fd44e commit 8292644

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testing/code/test_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def test_source_strip_multiline():
113113
def test_syntaxerror_rerepresentation():
114114
ex = pytest.raises(SyntaxError, _pytest._code.compile, "xyz xyz")
115115
assert ex.value.lineno == 1
116-
assert ex.value.offset == 7
116+
assert ex.value.offset in {5, 7} # cpython: 7, pypy3.6 7.1.1: 5
117117
assert ex.value.text.strip(), "x x"
118118

119119

0 commit comments

Comments
 (0)