mock.patch decorating a generator returns a regular function.
未關閉
還沒有人認領這個 Issue。
tests
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
| BPO | 27341 |
|---|---|
| Nosy | @terryjreedy, @rbtcollins, @voidspace, @shoshber, @tirkarthi |
| 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 2016-06-17.05:35:08.841>
labels = ['type-bug', 'tests']
title = 'mock.patch decorating a generator returns a regular function.'
updated_at = <Date 2019-12-13.11:13:51.134>
user = 'https://github.com/shoshber'
bugs.python.org fields:
activity = <Date 2019-12-13.11:13:51.134>
actor = 'xtreak'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Tests']
creation = <Date 2016-06-17.05:35:08.841>
creator = 'shoshber'
dependencies = []
files = ['43443', '43444']
hgrepos = []
issue_num = 27341
keywords = []
message_count = 6.0
messages = ['268709', '268749', '268757', '268758', '268761', '268762']
nosy_count = 5.0
nosy_names = ['terry.reedy', 'rbcollins', 'michael.foord', 'shoshber', 'xtreak']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'test needed'
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue27341'
versions = ['Python 3.5', 'Python 3.6']
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
該 issue 將 silentfail.py 作為範例測試、將 actual.out 作為記錄的輸出進行連結。首先執行範例,並將其 generator 行為與輸出進行比較,然後追蹤 mock.patch 的實作和現有的 mock 測試。當回歸測試捕捉到裝飾器行為且測試套件通過時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- testing-qa
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 35/100