[pypy-commit] pypy py3k: we print lots of [platform:execute] lines now, so we need to be a bit more careful about what to match with the regexp

antocuni noreply at buildbot.pypy.org
Wed Jun 6 15:16:02 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r55435:86a14fdd6eea
Date: 2012-06-06 15:10 +0200
http://bitbucket.org/pypy/pypy/changeset/86a14fdd6eea/

Log:	we print lots of [platform:execute] lines now, so we need to be a
	bit more careful about what to match with the regexp

diff --git a/pypy/module/termios/test/test_termios.py b/pypy/module/termios/test/test_termios.py
--- a/pypy/module/termios/test/test_termios.py
+++ b/pypy/module/termios/test/test_termios.py
@@ -23,7 +23,7 @@
 
     def _spawn(self, *args, **kwds):
         print 'SPAWN:', args, kwds
-        child = self.pexpect.spawn(timeout=600, *args, **kwds)
+        child = self.pexpect.spawn(timeout=600, maxread=5000, *args, **kwds)
         child.logfile = sys.stdout
         return child
 
@@ -36,9 +36,9 @@
         child.expect('>>> ')
         child.sendline('import termios')
         child.expect('>>> ')
-        child.sendline('termios.tcgetattr(0)')
-        child.expect('\[.*?\[.*?\]\]')
-        lst = eval(child.match.group(0))
+        child.sendline('print("attr=", termios.tcgetattr(0))')
+        child.expect('attr= (\[.*?\[.*?\]\])')
+        lst = eval(child.match.group(1))
         assert len(lst) == 7
         assert len(lst[-1]) == 32 # XXX is this portable???
 


More information about the pypy-commit mailing list