Remove (or integrate to CI/pyperformance) Module/_decimal/tests
未关闭
还没有人认领这个 Issue。
3.16
extension-modules
tests
type-feature
- 主要语言
- Python
- 星标
- 77.2k
- 派生
- 35.9k
- PR 合并指标
- PR 指标待抓取
描述
This is a follow-up of #115119.
The bench.py script already partially integrated to the pyperformance, see https://github.com/python/pyperformance/issues/473.
The Modules/_decimal/tests/deccheck.py currently is broken. Even with the patch
diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py
index bf277dd6879..b276700bc01 100644
--- a/Modules/_decimal/tests/deccheck.py
+++ b/Modules/_decimal/tests/deccheck.py
@@ -53,6 +53,8 @@
from formathelper import rand_format, rand_locale
from _pydecimal import _dec_from_triple
+sys.set_int_max_str_digits(0)
+
C = import_fresh_module('decimal', fresh=['_decimal'])
P = import_fresh_module('decimal', blocked=['_decimal'])
EXIT_STATUS = 0
I still got
$ ./python Modules/_decimal/tests/deccheck.py --short
Random seed: 1778644369
testing __abs__ ...
prec: 3 emin: -3 emax: 3
[...]
testing __hash__ ...
prec: 3 emin: -3 emax: 3
Traceback (most recent call last):
[...]
File "/home/sk/src/cpython/Modules/_decimal/tests/deccheck.py", line 570, in skip_error
return getattr(shandler, t.funcname, shandler.default)(t)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not callable
Probably these tests now are partially overlap with the CI tests. I think we should investigate this and merge tests or just run deccheck.py as part of CPython test suite.
Linked PRs
- gh-155198
- gh-155261
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 Modules/_decimal/tests/deccheck.py 开始,重现所示的 ./python Modules/_decimal/tests/deccheck.py --short 失败。将这些测试与重叠的 CI 测试以及 issue #473 中提到的部分 pyperformance 集成进行比较。重叠部分得到解决,并且 deccheck.py 被集成到测试工作流中或被删除,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- ci-cd, testing-qa
- Issue 类型
- 重构
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100