Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Test skipped on Linux

Đang mở
#503 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu với ipykernel/tests/test_kernel.py và hàm test_complete, sau đó tái hiện lỗi trên Linux. Truy vết yêu cầu hoàn thành qua các đường dẫn IPython/core/completer.py trong traceback và định dạng mô tả tham số của Jedi; hoàn tất khi test không còn cần bị bỏ qua và nhận được phản hồi hoàn thành mà không có ValueError.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The test_complete function was failing on Travis in master with:

    def test_complete():

        with kernel() as kc:

            execute(u'a = 1', kc=kc)

            wait_for_idle(kc)

            cell = 'import IPython\nb = a.'

            kc.complete(cell)

>           reply = kc.get_shell_msg(block=True, timeout=TIMEOUT)

ipykernel/tests/test_kernel.py:265: 

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

../../../virtualenv/python3.6.7/lib/python3.6/site-packages/jupyter_client/client.py:78: in get_shell_msg

    return self.shell_channel.get_msg(*args, **kwargs)

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <jupyter_client.blocking.channels.ZMQSocketChannel object at 0x7f3c1ededb70>

block = True, timeout = 15000

    def get_msg(self, block=True, timeout=None):

        """ Gets a message if there is one that is ready. """

        if block:

            if timeout is not None:

                timeout *= 1000  # seconds to ms

            ready = self.socket.poll(timeout)

        else:

            ready = self.socket.poll(timeout=0)

    

        if ready:

            return self._recv()

        else:

>           raise Empty

E           queue.Empty

../../../virtualenv/python3.6.7/lib/python3.6/site-packages/jupyter_client/blocking/channels.py:57: Empty
----------------------------- Captured stdout call -----------------------------

[IPKernelApp] ERROR | Exception in message handler:

Traceback (most recent call last):

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 268, in dispatch_shell

    yield gen.maybe_future(handler(stream, idents, msg))

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/tornado/gen.py", line 735, in run

    value = future.result()

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/tornado/gen.py", line 209, in wrapper

    yielded = next(result)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/ipykernel/kernelbase.py", line 583, in complete_request

    matches = yield gen.maybe_future(self.do_complete(code, cursor_pos))

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 354, in do_complete

    return self._experimental_do_complete(code, cursor_pos)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/ipykernel/ipkernel.py", line 379, in _experimental_do_complete

    completions = list(_rectify_completions(code, raw_completions))

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 484, in rectify_completions

    completions = list(completions)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 1820, in completions

    for c in self._completions(text, offset, _timeout=self.jedi_compute_type_timeout/1000):

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 1877, in _completions

    signature = _make_signature(jm)

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 991, in _make_signature

    return '(%s)'% ', '.join([f for f in (_formatparamchildren(p) for signature in completion.get_signatures()

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 991, in <listcomp>

    return '(%s)'% ', '.join([f for f in (_formatparamchildren(p) for signature in completion.get_signatures()

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 992, in <genexpr>

    for p in signature.defined_names()) if f])

  File "/home/travis/virtualenv/python3.6.7/lib/python3.6/site-packages/IPython/core/completer.py", line 969, in _formatparamchildren

    'Expected "param ...", found %r".' % description)

ValueError: Jedi function parameter description have change format.Expected "param ...", found 'def __sizeof__'".

We are skipping the test on Linux in #500 because we couldn't find a way to fix the test.

Ngôn ngữ chính
Python
Star
734
Fork
411
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ipython/ipykernel

Tất cả issue của ipython/ipykernel

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.