octave_kernel icon indicating copy to clipboard operation
octave_kernel copied to clipboard

test failures with octave 7.1

Open opoplawski opened this issue 2 years ago • 3 comments

The Fedora python-octave-kernel package fails to build with the following test failure with octave 7.1:

+ cd octave_kernel-0.34.2
+ PYTHONPATH=/builddir/build/BUILDROOT/python-octave-kernel-0.34.2-1.fc37.x86_64/usr/lib/python3.10/site-packages
+ JUPYTER_PATH=/builddir/build/BUILDROOT/python-octave-kernel-0.34.2-1.fc37.x86_64/usr/share/jupyter
+ xvfb-run -a -s '-screen 0 640x480x24' /usr/bin/python3 test_octave_kernel.py -v
/usr/lib/python3.10/site-packages/jupyter_client/manager.py:95: DeprecationWarning: There is no current event loop
  self._ready = Future()
/usr/lib/python3.10/site-packages/jupyter_client/utils.py:14: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
/usr/lib/python3.10/site-packages/jupyter_client/kernelspec.py:50: DeprecationWarning: Passing unrecognized arguments to super(KernelSpec).__init__(mimetype='text/x-octave', name='octave').
object.__init__() takes exactly one argument (the instance to initialize)
This is deprecated in traitlets 4.2.This error will be raised in a future release of traitlets.
  return cls(resource_dir=resource_dir, **kernel_dict)
test_clear_output (__main__.OctaveKernelTests) ... skipped ''
test_completion (__main__.OctaveKernelTests) ... /usr/lib64/python3.10/site-packages/zmq/_future.py:410: DeprecationWarning: There is no current event loop
  f = future or self._Future()
test_display_data (__main__.OctaveKernelTests) ... skipped ''
test_error (__main__.OctaveKernelTests) ... skipped ''
test_execute_result (__main__.OctaveKernelTests) ... skipped ''
test_execute_stderr (__main__.OctaveKernelTests) ... skipped ''
test_execute_stdout (__main__.OctaveKernelTests) ... FAIL
test_history (__main__.OctaveKernelTests) ... skipped ''
test_inspect (__main__.OctaveKernelTests) ... skipped ''
test_is_complete (__main__.OctaveKernelTests) ... skipped ''
test_kernel_info (__main__.OctaveKernelTests) ... ok
test_pager (__main__.OctaveKernelTests) ... ok
======================================================================
FAIL: test_completion (__main__.OctaveKernelTests) (text='acos')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/jupyter_kernel_test/__init__.py", line 145, in test_completion
    self.assertEqual(set(reply['content']['matches']),
AssertionError: Items in the first set but not the second:
'\x1b[?2004h'
'\x1b[?2004l'

======================================================================
FAIL: test_execute_stdout (__main__.OctaveKernelTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/jupyter_kernel_test/__init__.py", line 102, in test_execute_stdout
    self.assertIn('hello, world', msg['content']['text'])
AssertionError: 'hello, world' not found in '\x1b[?2004l\n'

----------------------------------------------------------------------

This is with jupyter-kernel-test 0.4.3.

opoplawski avatar May 11 '22 03:05 opoplawski

I believe this is the same issue as https://github.com/kislyuk/argcomplete/issues/337#issuecomment-771835184

blink1073 avatar May 12 '22 14:05 blink1073

Yes, it is the same issue, but the change in metakernel above does not fix it.

QuLogic avatar Nov 28 '22 06:11 QuLogic

I have the same problem on Ubuntu 22.04 with Octave 7.2.0, as well. My metakernel 0.29.4, contains the proposed fix. I could not figure out, why it does not actually fix it.

However, as a workaround, I added set enable-bracketed-paste off in my ~/.inputrc (according to https://savannah.gnu.org/bugs/?54335#comment3 this disables bracketed paste in octave). This works for me, but it might affect other applications as well. I have not encountered any problems, yet.

iimog avatar Jul 12 '23 20:07 iimog