Updated pytest-timeout changes internal functions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả 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 tests/logs.py và tests/pytest_hooks.py, sau đó so sánh cách chúng sử dụng pytest-timeout với các thay đổi API của 2.3.0 được mô tả trong issue. Chạy các bài kiểm thử debugpy liên quan; được xem là hoàn tất khi cả hai tích hợp kiểm thử bị ảnh hưởng đều hoạt động với pytest-timeout 2.3.0 mà không dựa vào hàm đã bị loại bỏ hoặc bỏ qua đối số mới.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
pytest-timeout version 2.3.0 has changed two internal functions that debugpy uses in its tests:
write_title()has been removed (used intests/logs.py)dump_stacks()now takes an argument (terminal)
I have addressed the first one in Debian in a hackish way:
--- a/tests/logs.py
+++ b/tests/logs.py
@@ -4,7 +4,7 @@
import io
import os
-import pytest_timeout
+from _pytest._io import TerminalWriter
import sys
from debugpy.common import json, log
@@ -27,5 +27,6 @@
pass
else:
path = os.path.relpath(path, log.log_dir)
- pytest_timeout.write_title(path)
+ out = TerminalWriter()
+ out.sep("+", title=path)
print(s, file=sys.stderr)
but see https://github.com/pytest-dev/pytest/issues/10436 for a warning about this approach. For the second, I've done this:
--- a/tests/pytest_hooks.py
+++ b/tests/pytest_hooks.py
@@ -61,4 +61,4 @@
# we want to print the pydevd log as well. This is not a normal pytest hook - \
we
# just detour pytest_timeout.dump_stacks directly.
_dump_stacks = pytest_timeout.dump_stacks
-pytest_timeout.dump_stacks = lambda: (_dump_stacks(), logs.dump())
+pytest_timeout.dump_stacks = lambda term: (_dump_stacks(term), logs.dump())
- Ngôn ngữ chính
- Python
- Star
- 2.5k
- Fork
- 202
- Merge trung bình
- 5 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
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 microsoft/debugpy
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Document "rules"-option Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của microsoft/debugpy
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·