Author: Antonio Cuni <[email protected]>
Branch: py3k
Changeset: r59150:f947138ba323
Date: 2012-11-30 10:51 +0000
http://bitbucket.org/pypy/pypy/changeset/f947138ba323/

Log:    improve this test. It took me a second to understand what was going
        on, better to explain more explicitly :)

diff --git a/pypy/interpreter/pyparser/test/test_parsestring.py 
b/pypy/interpreter/pyparser/test/test_parsestring.py
--- a/pypy/interpreter/pyparser/test/test_parsestring.py
+++ b/pypy/interpreter/pyparser/test/test_parsestring.py
@@ -37,8 +37,14 @@
             space.raises_w(space.w_ValueError,
                            parsestring.parsestr, space, None, s)
 
+        # only ASCII characters are allowed in bytes literals (but of course
+        # you can use escapes to get the non-ASCII ones (note that in the
+        # second case we use a raw string, the the parser actually sees the
+        # chars '\' 'x' 'e' '9'
         space.raises_w(space.w_SyntaxError,
                        parsestring.parsestr, space, None, "b'\xe9'")
+        self.parse_and_compare(r"b'\xe9'", chr(0xE9))
+
 
     def test_unicode(self):
         space = self.space
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to