summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_traceback.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-02-09 21:28:07 (GMT)
committerGeorg Brandl <georg@python.org>2007-02-09 21:28:07 (GMT)
commit88fc6646d1b97cb3ba6188808e7c016884d44a73 (patch)
tree4cf73aca05a06e89ae71a719c7b2329af51392b8 /Lib/test/test_traceback.py
parent08c47ba0df4ba87cdce34c126e5bdb28f8c6034c (diff)
downloadcpython-88fc6646d1b97cb3ba6188808e7c016884d44a73.zip
cpython-88fc6646d1b97cb3ba6188808e7c016884d44a73.tar.gz
cpython-88fc6646d1b97cb3ba6188808e7c016884d44a73.tar.bz2
* Remove PRINT_ITEM(_TO), PRINT_NEWLINE(_TO) opcodes.
* Fix some docstrings and one Print -> print. * Fix test_{class,code,descrtut,dis,extcall,parser,popen,pkg,subprocess,syntax,traceback}. These were the ones that generated code with a print statement. In most remaining failing tests there's an issue with the soft space.
Diffstat (limited to 'Lib/test/test_traceback.py')
-rw-r--r--Lib/test/test_traceback.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 1ccb2b2..9c7af70 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -25,7 +25,7 @@ class TracebackCases(unittest.TestCase):
import test.badsyntax_nocaret
def syntax_error_bad_indentation(self):
- compile("def spam():\n print 1\n print 2", "?", "exec")
+ compile("def spam():\n print(1)\n print(2)", "?", "exec")
def test_caret(self):
err = self.get_exception_format(self.syntax_error_with_caret,
@@ -48,9 +48,9 @@ class TracebackCases(unittest.TestCase):
err = self.get_exception_format(self.syntax_error_bad_indentation,
IndentationError)
self.assert_(len(err) == 4)
- self.assert_(err[1].strip() == "print 2")
+ self.assert_(err[1].strip() == "print(2)")
self.assert_("^" in err[2])
- self.assert_(err[1].find("2") == err[2].find("^"))
+ self.assert_(err[1].find(")") == err[2].find("^"))
def test_bug737473(self):
import sys, os, tempfile, time