All unittest.mock autospec-generated methods are coroutine functions
未关闭
还没有人认领这个 Issue。
3.10
3.8 (EOL)
3.9 (EOL)
stdlib
type-bug
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 36k
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 558
描述
| BPO | 41628 |
|---|---|
| Nosy | @lisroach, @tirkarthi, @twm |
| Files |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2020-08-24.23:31:52.482>
labels = ['3.8', 'type-bug', 'library', '3.9', '3.10']
title = 'All unittest.mock autospec-generated methods are coroutine functions'
updated_at = <Date 2020-08-25.09:17:33.582>
user = 'https://github.com/twm'
bugs.python.org fields:
activity = <Date 2020-08-25.09:17:33.582>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2020-08-24.23:31:52.482>
creator = 'twm'
dependencies = []
files = ['49425']
hgrepos = []
issue_num = 41628
keywords = []
message_count = 2.0
messages = ['375862', '375864']
nosy_count = 3.0
nosy_names = ['lisroach', 'xtreak', 'twm']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue41628'
versions = ['Python 3.8', 'Python 3.9', 'Python 3.10']
Linked PRs
- gh-119777
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从附带的 repro4.py 开始,检查 unittest.mock 对生成方法的 autospec 行为,尤其是哪些方法会被识别为 coroutine 函数。将该复现与 mock 现有的行为和测试进行比较;当报告的 autospec 分类得到修正,且没有使真正的 coroutine 方法发生回归时,即视为完成。issue 中已经注明了一个关联的 PR,因此请在开始之前检查其状态。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- testing-qa
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 25/100