metakernel icon indicating copy to clipboard operation
metakernel copied to clipboard

Test failure with readline library version 8.1

Open ellert opened this issue 4 years ago • 2 comments

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.

ellert avatar Jan 17 '21 06:01 ellert

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?

anewusername avatar Jul 29 '22 21:07 anewusername

Would REPLWrapper.run_command() be a reasonable place to check for and strip any bracketing?

Sounds right to me

blink1073 avatar Jul 29 '22 22:07 blink1073