pypy/module/termios/test/test_termios.py::TestTermios::()::test_one
self = <test_termios.TestTermios object at 0x0000000139f3db40>
def test_one(self):
child = self.spawn(['--withmod-termios'])
child.expect("Python ")
child.expect('>>> ')
child.sendline('import termios')
child.expect('>>> ')
child.sendline('termios.tcgetattr(0)')
# output of the first time is ignored: it contains the compilation
# of more C stuff relating to errno
child.expect('>>> ')
child.sendline('print("attr=", termios.tcgetattr(0))')
> child.expect('attr= (\[.*?\[.*?\]\])')
module/termios/test/test_termios.py:46:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../virt_test/site-packages/pexpect/spawnbase.py:355: in expect
timeout, searchwindowsize, async_)
../virt_test/site-packages/pexpect/spawnbase.py:383: in expect_list
return exp.expect_loop(timeout)
../virt_test/site-packages/pexpect/expect.py:179: in expect_loop
return self.eof(e)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pexpect.expect.Expecter object at 0x0000000139efefe0>
err = EOF('End Of File (EOF). Empty string style platform.',)
def eof(self, err=None):
spawn = self.spawn
spawn.before = spawn._before.getvalue()
spawn._buffer = spawn.buffer_type()
spawn._before = spawn.buffer_type()
spawn.after = EOF
index = self.searcher.eof_index
if index >= 0:
spawn.match = EOF
spawn.match_index = index
return index
else:
spawn.match = None
spawn.match_index = None
msg = str(spawn)
msg += '\nsearcher: %s' % self.searcher
if err is not None:
msg = str(err) + '\n' + msg
exc = EOF(msg)
exc.__cause__ = None # in Python 3.x we can use "raise exc from None"
> raise exc
E EOF: End Of File (EOF). Empty string style platform.
E <pexpect.pty_spawn.spawn object at 0x0000000139ed31d8>
E command: /Users/matti/build-worker-arm64/own-macos-arm64/build/virt_test/bin/python
E args: ['/Users/matti/build-worker-arm64/own-macos-arm64/build/virt_test/bin/python', '/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/bin/pyinteractive.py', '-S', '--withmod-termios']
E buffer (last 100 chars): ''
E before (last 100 chars): '1@o\x1b[1@s\x1b[1@.\x1b[1@t\x1b[1@c\x1b[1@g\x1b[1@e\x1b[1@t\x1b[1@a\x1b[1@t\x1b[1@t\x1b[1@r\x1b[1@(\x1b[1@0\x1b[1@)\x1b[1@)\x1b[41D\n\r\x1b[?2004l\x1b[?1l\x1b>'
E after: <class 'pexpect.exceptions.EOF'>
E match: None
E match_index: None
E exitstatus: None
E flag_eof: True
E pid: 66167
E child_fd: 15
E closed: False
E timeout: 600
E delimiter: <class 'pexpect.exceptions.EOF'>
E logfile: <_pytest.capture.EncodedFile object at 0x0000000138c7a7c8>
E logfile_read: None
E logfile_send: None
E maxread: 5000
E ignorecase: False
E searchwindowsize: None
E delaybeforesend: 0.05
E delayafterclose: 0.1
E delayafterterminate: 0.1
E searcher: searcher_re:
E 0: re.compile('attr= (\\[.*?\\[.*?\\]\\])')
../virt_test/site-packages/pexpect/expect.py:122: EOF
---------- Captured stdout call ----------
SPAWN: ('/Users/matti/build-worker-arm64/own-macos-arm64/build/virt_test/bin/python', ['/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/bin/pyinteractive.py', '-S', '--withmod-termios']) {}
PyPy 7.3.23-alpha0 in StdObjSpace on top of Python 2.7.18 (startuptime: 6.67 secs)
[?2004h[?1h=[?25l[1A
>>>> [34h[?25himport termios
[1@i[1@m[1@p[1@o[1@r[1@t[1@ [1@t[1@e[1@r[1@m[1@i[1@o[1@s[19D
[?2004l[?1l>[?2004h[?1h=[?25l[1A
>>>> [34h[?25htermios.tcgetattr(0)
[1@t[1@e[1@r[1@m[1@i[1@o[1@s[1@.[1@t[1@c[1@g[1@e[1@t[1@a[1@t[1@t[1@r[1@([1@0[1@)[25D
[?2004l[?1l>[11010, 0, 3, 0, 9600, 9600, [b'K', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\x00', b'\xcb', b'\x05', b'\x00', b' ', b'\x00', b'\x00', b'\x00', b'\x00', b'\x04', 255, 255, b'\x7f', b'\x17']]
[?2004h[?1h=[?25l[1A
>>>> [34h[?25hprint("attr=", termios.tcgetattr(0))
[1@p[1@r[1@i[1@n[1@t[1@([1@"[1@a[1@t[1@t[1@r[1@=[1@"[1@,[1@ [1@t[1@e[1@r[1@m[1@i[1@o[1@s[1@.[1@t[1@c[1@g[1@e[1@t[1@a[1@t[1@t[1@r[1@([1@0[1@)[1@)[41D
[?2004l[?1l>
builder: own-macos-arm64 build #1204
test: pypy/module/termios/test/test_termios/py/TestTermios/()/test_one