Updated pytest-timeout changes internal functions
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- testing-qa
调研方向
从 tests/logs.py 和 tests/pytest_hooks.py 开始,然后将它们对 pytest-timeout 的使用方式与 issue 中描述的 2.3.0 API 变更进行比较。运行相关的 debugpy 测试;当受影响的两个测试集成都能在 pytest-timeout 2.3.0 下工作,且不依赖已移除的函数或省略新参数时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
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())
- 主要语言
- Python
- 星标
- 2.5k
- 派生
- 202
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/debugpy 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 78/100
-
documentation
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 68/100
查看 microsoft/debugpy 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
难度 2/5 1-3 小时 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 1/5 1 小时以内 新手友好度 80/100
learningequality/kolibri#15351 · 2 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
Name consistency 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
eellak/triplestore#65 · 1 条评论 ·