[pypy-svn] r79970 - pypy/trunk/pypy/interpreter/test
arigo at codespeak.net
arigo at codespeak.net
Sat Dec 11 12:15:18 CET 2010
Author: arigo
Date: Sat Dec 11 12:15:16 2010
New Revision: 79970
Modified:
pypy/trunk/pypy/interpreter/test/test_compiler.py
Log:
A failing test, causing the failure of the stdlib's test_codeop.py.
Modified: pypy/trunk/pypy/interpreter/test/test_compiler.py
==============================================================================
--- pypy/trunk/pypy/interpreter/test/test_compiler.py (original)
+++ pypy/trunk/pypy/interpreter/test/test_compiler.py Sat Dec 11 12:15:16 2010
@@ -919,3 +919,22 @@
assert e.msg == 'unindent does not match any outer indentation level'
else:
raise Exception("DID NOT RAISE")
+
+
+ def test_repr_vs_str(self):
+ source1 = "x = (\n"
+ source2 = "x = (\n\n"
+ try:
+ exec source1
+ except SyntaxError, err1:
+ pass
+ else:
+ raise Exception("DID NOT RAISE")
+ try:
+ exec source2
+ except SyntaxError, err2:
+ pass
+ else:
+ raise Exception("DID NOT RAISE")
+ assert str(err1) != str(err2)
+ assert repr(err1) != repr(err2)
More information about the Pypy-commit
mailing list