[pypy-commit] pypy py3k: adapt the import of StringIO

antocuni noreply at buildbot.pypy.org
Wed Mar 14 19:53:57 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r53587:80c39a1059aa
Date: 2012-03-14 17:52 +0100
http://bitbucket.org/pypy/pypy/changeset/80c39a1059aa/

Log:	adapt the import of StringIO

diff --git a/pypy/objspace/std/test/test_userobject.py b/pypy/objspace/std/test/test_userobject.py
--- a/pypy/objspace/std/test/test_userobject.py
+++ b/pypy/objspace/std/test/test_userobject.py
@@ -160,13 +160,14 @@
         assert lst == [42]
 
     def test_del_exception(self):
-        import sys, StringIO, gc
+        import sys, gc
+        from io import StringIO
         class A(object):
             def __del__(self):
                 yaddadlaouti
         prev = sys.stderr
         try:
-            sys.stderr = StringIO.StringIO()
+            sys.stderr = StringIO()
             A()
             gc.collect()
             res = sys.stderr.getvalue()


More information about the pypy-commit mailing list