metakernel
metakernel copied to clipboard
Test failure with readline library version 8.1
After upgrading the readline library to version 8.1 the following test failure started to appear:
=================================== FAILURES ===================================
_________________________ REPLWrapTestCase.test_python _________________________
self = <metakernel.tests.test_replwrap.REPLWrapTestCase testMethod=test_python>
def test_python(self):
if platform.python_implementation() == 'PyPy':
raise unittest.SkipTest("This test fails on PyPy because of REPL differences")
p = replwrap.python(sys.executable)
res = p.run_command('4+7')
> assert res.strip() == '11'
E AssertionError: assert '\x1b[?2004l\...\n\x1b[?2004h' == '11'
E - 11
E +
E + 11
E +
/builddir/build/BUILD/metakernel-0.27.5/metakernel/tests/test_replwrap.py:81: AssertionError
Downgrading to readline version 8.0 makes the failure go away.
Per pexpect/pexpect#669 this is unlikely to be fixed upstream, but it is having some impact downstream already ( blink1073/oct2py#237 and blink1073/oct2py#248 ).
Would REPLWrapper.run_command() be a reasonable place to check for and strip any bracketing?
Would REPLWrapper.run_command() be a reasonable place to check for and strip any bracketing?
Sounds right to me