[Python-checkins] cpython (2.7): Fix Test for issue #13500

jesus.cea python-checkins at python.org
Sun Feb 19 04:21:27 CET 2012


http://hg.python.org/cpython/rev/2909e60e7e13
changeset:   75027:2909e60e7e13
branch:      2.7
parent:      75024:0d442e166c8f
user:        Jesus Cea <jcea at jcea.es>
date:        Sun Feb 19 04:20:45 2012 +0100
summary:
  Fix Test for issue #13500

files:
  Lib/test/test_cmd.py |  10 +++++-----
  1 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/Lib/test/test_cmd.py b/Lib/test/test_cmd.py
--- a/Lib/test/test_cmd.py
+++ b/Lib/test/test_cmd.py
@@ -186,7 +186,7 @@
     class simplecmd2(simplecmd):
 
         def do_EOF(self, args):
-            print('*** Unknown syntax: EOF', file=self.stdout)
+            print >>self.stdout, '*** Unknown syntax: EOF'
             return True
 
 
@@ -203,8 +203,8 @@
 
 
     def test_input_reset_at_EOF(self):
-        input = io.StringIO("print test\nprint test2")
-        output = io.StringIO()
+        input = StringIO.StringIO("print test\nprint test2")
+        output = StringIO.StringIO()
         cmd = self.simplecmd2(stdin=input, stdout=output)
         cmd.use_rawinput = False
         cmd.cmdloop()
@@ -212,8 +212,8 @@
             ("(Cmd) test\n"
              "(Cmd) test2\n"
              "(Cmd) *** Unknown syntax: EOF\n"))
-        input = io.StringIO("print \n\n")
-        output = io.StringIO()
+        input = StringIO.StringIO("print \n\n")
+        output = StringIO.StringIO()
         cmd.stdin = input
         cmd.stdout = output
         cmd.cmdloop()

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list