6.15.2: pytest is failing in `ipykernel/tests/test_debugger.py::test_stop_on_breakpoint` unit
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- 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_debugger.py::test_stop_on_breakpoint và tái hiện nó bằng bản build PEP517 --no-isolation được báo cáo, wheel đã cài đặt và môi trường pytest. Điều tra lý do phản hồi dumpCell thiếu body và sourcePath như mong đợi, sau đó chạy test tập trung và toàn bộ pytest suite để xác nhận lỗi đã được giải quyết.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation- because I'm calling
buildwith--no-isolationI'm using during all processes only locally installed modules - install .whl file in </install/prefix>
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.15.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.15.2-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.15.2, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests
plugins: timeout-2.1.0, flaky-3.7.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 116 items
ipykernel/tests/test_async.py ..ss [ 3%]
ipykernel/tests/test_connect.py ..... [ 7%]
ipykernel/tests/test_debugger.py ...F.... [ 14%]
ipykernel/tests/test_embed_kernel.py ... [ 17%]
ipykernel/tests/test_eventloop.py . [ 18%]
ipykernel/tests/test_heartbeat.py .... [ 21%]
ipykernel/tests/test_io.py .. [ 23%]
ipykernel/tests/test_jsonutil.py sssss [ 27%]
ipykernel/tests/test_kernel.py .ss..........s..s...... [ 47%]
ipykernel/tests/test_kernelspec.py ............. [ 58%]
ipykernel/tests/test_message_spec.py ....................... [ 78%]
ipykernel/tests/test_pickleutil.py ..... [ 82%]
ipykernel/tests/test_start_kernel.py .. [ 84%]
ipykernel/tests/test_zmq_shell.py ...... [ 89%]
ipykernel/inprocess/tests/test_kernel.py s...... [ 95%]
ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%]
================================================================================= FAILURES =================================================================================
_________________________________________________________________________ test_stop_on_breakpoint __________________________________________________________________________
kernel_with_debug = <jupyter_client.blocking.client.BlockingKernelClient object at 0x7f886e532eb0>
def test_stop_on_breakpoint(kernel_with_debug):
code = """def f(a, b):
c = a + b
return c
f(2, 3)"""
r = wait_for_debug_request(kernel_with_debug, "dumpCell", {"code": code})
> source = r["body"]["sourcePath"]
E KeyError: 'body'
ipykernel/tests/test_debugger.py:138: KeyError
===Flaky Test Report===
test_embed_kernel_basic passed 1 out of the required 1 times. Success!
test_embed_kernel_namespace passed 1 out of the required 1 times. Success!
test_embed_kernel_reentrant passed 1 out of the required 1 times. Success!
test_subprocess_print passed 1 out of the required 1 times. Success!
test_subprocess_noprint passed 1 out of the required 1 times. Success!
test_subprocess_error passed 1 out of the required 1 times. Success!
test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success!
test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success!
===End Flaky Test Report===
=========================================================================== slowest 10 durations ===========================================================================
31.37s call ipykernel/tests/test_kernel.py::test_shutdown_subprocesses
6.32s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio]
3.09s call ipykernel/tests/test_kernel.py::test_control_thread_priority
2.96s call ipykernel/tests/test_kernel.py::test_interrupt_during_input
2.82s call ipykernel/tests/test_kernel.py::test_subprocess_print
2.81s call ipykernel/tests/test_kernel.py::test_interrupt_with_message
2.53s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error
2.29s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant
2.03s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace
1.78s setup ipykernel/tests/test_debugger.py::test_stop_on_breakpoint
========================================================================= short test summary info ==========================================================================
SKIPPED [1] ipykernel/tests/test_async.py:34: Requires trio
SKIPPED [1] ipykernel/tests/test_async.py:34: Requires curio
SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op
SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op
SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op
SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op
SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op
SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing
SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing
SKIPPED [1] ipykernel/tests/test_kernel.py:290: only run on Windows
SKIPPED [1] ipykernel/tests/test_kernel.py:349: test only on windows
SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:129: Currently don't capture during test as pytest does its own capturing
FAILED ipykernel/tests/test_debugger.py::test_stop_on_breakpoint - KeyError: 'body'
========================================================== 1 failed, 103 passed, 12 skipped in 103.54s (0:01:43) ===========================================================
Here is list of installed modules in build env
Package Version
----------------------------- -----------------
alabaster 0.7.12
asttokens 2.0.5
attrs 22.1.0
Babel 2.10.2
backcall 0.2.0
Brlapi 0.8.3
build 0.8.0
charset-normalizer 2.1.0
codespell 2.1.0
cycler 0.11.0
debugpy 1.6.3
decorator 5.1.1
distro 1.7.0
docutils 0.18.1
editables 0.3
entrypoints 0.4
executing 0.8.3
extras 1.0.0
fixtures 4.0.0
flaky 3.7.0
fonttools 4.37.1
gpg 1.17.1-unknown
hatchling 1.8.1
idna 3.3
imagesize 1.4.1
importlib-metadata 4.12.0
iniconfig 1.1.1
ipykernel 6.15.1
ipyparallel 8.4.1
ipython 8.4.0
jedi 0.18.1
Jinja2 3.1.1
jupyter_client 7.3.5
jupyter_core 4.11.1
kiwisolver 1.4.4
libcomps 0.1.18
louis 3.22.0
markdown-it-py 2.1.0
MarkupSafe 2.1.1
matplotlib 3.5.3
matplotlib-inline 0.1.5
mdit-py-plugins 0.3.0
mdurl 0.1.1
myst-parser 0.18.0
nest-asyncio 1.5.5
numpy 1.23.1
olefile 0.46
packaging 21.3
parso 0.8.3
pathspec 0.9.0
pbr 5.9.0
pep517 0.12.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.2.0
pip 22.2.1
pluggy 1.0.0
prompt-toolkit 3.0.29
psutil 5.9.0
ptyprocess 0.7.0
pure-eval 0.2.2
py 1.11.0
Pygments 2.13.0
PyGObject 3.42.2
pyparsing 3.0.9
pytest 7.1.2
pytest-timeout 2.1.0
python-dateutil 2.8.2
pytz 2022.1
PyYAML 6.0
pyzmq 23.2.0
requests 2.28.1
rpm 4.17.0
setuptools 65.3.0
six 1.16.0
snowballstemmer 2.2.0
Sphinx 5.1.1
sphinxcontrib-applehelp 1.0.2.dev20220730
sphinxcontrib-devhelp 1.0.2.dev20220730
sphinxcontrib_github_alt 1.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1.dev20220730
sphinxcontrib-qthelp 1.0.3.dev20220730
sphinxcontrib-serializinghtml 1.1.5
stack-data 0.5.0
testtools 2.5.0
tomli 2.0.1
tornado 6.2
tqdm 4.64.0
traitlets 5.3.0
typing_extensions 4.2.0
urllib3 1.26.12
wcwidth 0.2.5
wheel 0.37.1
zipp 3.8.1
- 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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ipython/ipykernel
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
-
ipython/ipykernel#1550 · 1 bình luận · 1 reaction · 1 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 66/100
Tất cả issue của ipython/ipykernel
Issue tương tự
-
Add: hunch Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
DiamondLightSource/dodal#2211 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
openml/openml-python#1749 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
sipyourdrink-ltd/bernstein#6191 ·