python / python/cpython

unittest use dir(module) to load test cases. Run unittest file by _PyRun_SimpleFileObject, have bug

未关闭
#87,796 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

stdlib
主要语言
Python
星标
77.2k
派生
36k
平均合并
1 天 9 小时
30 天内合并 PR
558

描述

BPO 43630
Nosy @JunyiXie

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 2021-03-26.07:44:05.883>
labels = []
title = 'unittest use dir(module) to load test cases. Run unittest file by _PyRun_SimpleFileObject, have bug'
updated_at = <Date 2021-03-26.07:44:05.883>
user = 'https://github.com/JunyiXie'

bugs.python.org fields:

activity = <Date 2021-03-26.07:44:05.883>
actor = 'JunyiXie'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2021-03-26.07:44:05.883>
creator = 'JunyiXie'
dependencies = []
files = []
hgrepos = []
issue_num = 43630
keywords = []
message_count = 1.0
messages = ['389540']
nosy_count = 1.0
nosy_names = ['JunyiXie']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue43630'
versions = []

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先重现已报告的 unittest 行为,并跟踪 unittest 在加载测试用例时如何使用 dir(module),重点关注通过 _PyRun_SimpleFileObject 执行的过程。该 issue 未指定源文件或测试;完成意味着已重现并修复该 bug,且已通过回归测试覆盖。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
testing-qa
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。