[pypy-commit] pypy py3.6: fix test and a typo
rlamy
pypy.commits at gmail.com
Sun Apr 22 20:34:30 EDT 2018
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3.6
Changeset: r94424:0bfc5e908da5
Date: 2018-04-23 01:33 +0100
http://bitbucket.org/pypy/pypy/changeset/0bfc5e908da5/
Log: fix test and a typo
diff --git a/pypy/interpreter/pyparser/parsestring.py b/pypy/interpreter/pyparser/parsestring.py
--- a/pypy/interpreter/pyparser/parsestring.py
+++ b/pypy/interpreter/pyparser/parsestring.py
@@ -119,7 +119,7 @@
if first_escape_error_char != '':
space.warn(
- space.newtext("invalid excape sequence '\\%c'"
+ space.newtext("invalid escape sequence '\\%c'"
% first_escape_error_char),
space.w_DeprecationWarning)
diff --git a/pypy/module/__builtin__/test/test_compile.py b/pypy/module/__builtin__/test/test_compile.py
--- a/pypy/module/__builtin__/test/test_compile.py
+++ b/pypy/module/__builtin__/test/test_compile.py
@@ -39,12 +39,12 @@
except SyntaxError as e:
assert e.lineno == 1
- def test_incorrect_escape_deprecation(self):
+ def test_incorrect_escape_deprecation_bytes(self):
import warnings
with warnings.catch_warnings(record=True) as l:
warnings.simplefilter('always', category=DeprecationWarning)
- compile(r"'\%c'" % 125, '', 'exec')
- assert l == None
+ compile(r"b'\}'", '', 'exec')
+ assert len(l) == 1
def test_unicode_encoding(self):
code = "# -*- coding: utf-8 -*-\npass\n"
More information about the pypy-commit
mailing list