[pypy-commit] pypy pyparser-improvements-2: fix fallout from position fixes
cfbolz
pypy.commits at gmail.com
Mon Apr 9 03:31:59 EDT 2018
Author: Carl Friedrich Bolz-Tereick <cfbolz at gmx.de>
Branch: pyparser-improvements-2
Changeset: r94280:fefc40951b6f
Date: 2018-04-09 09:27 +0200
http://bitbucket.org/pypy/pypy/changeset/fefc40951b6f/
Log: fix fallout from position fixes
diff --git a/pypy/interpreter/test/test_compiler.py b/pypy/interpreter/test/test_compiler.py
--- a/pypy/interpreter/test/test_compiler.py
+++ b/pypy/interpreter/test/test_compiler.py
@@ -77,7 +77,7 @@
""")
assert self.space.unwrap(w_args) == (
'unindent does not match any outer indentation level',
- ('<string>', 3, 0, ' y\n'))
+ ('<string>', 3, 2, ' y\n'))
def test_getcodeflags(self):
code = self.compiler.compile('from __future__ import division\n',
diff --git a/pypy/interpreter/test/test_syntax.py b/pypy/interpreter/test/test_syntax.py
--- a/pypy/interpreter/test/test_syntax.py
+++ b/pypy/interpreter/test/test_syntax.py
@@ -750,7 +750,7 @@
except SyntaxError as e:
assert e.lineno == 4
assert e.text.endswith('a b c d e\n')
- assert e.offset == e.text.index('b')
+ assert e.offset == e.text.index('b') + 1 # offset is 1-based
else:
raise Exception("no SyntaxError??")
More information about the pypy-commit
mailing list