python / python/cpython

Remove (or integrate to CI/pyperformance) Module/_decimal/tests

Đang mở
#149,755 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

3.16 extension-modules tests type-feature
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với Modules/_decimal/tests/deccheck.py và tái hiện lỗi được hiển thị của ./python Modules/_decimal/tests/deccheck.py --short. So sánh các kiểm thử này với các kiểm thử CI bị trùng lặp và phần tích hợp pyperformance chưa hoàn chỉnh được đề cập trong issue #473. Được xem là hoàn tất khi phần trùng lặp đã được giải quyết và deccheck.py либо được tích hợp vào quy trình kiểm thử hoặc bị xóa.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
ci-cd, testing-qa
Loại issue
Tái cấu trúc
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.