Specify dependency of each test case
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các phương thức kiểm thử và các cơ chế array_helpers và stubbing module hiện có. Sau đó, điều tra collection hook của pytest và cách suite biểu diễn các hàm cấp cao nhất, các phương thức của đối tượng array và các toán tử. Phần hoàn thành cần bao gồm một biểu diễn dependency được định nghĩa, một dependency graph và cơ chế ưu tiên hoặc bỏ qua kiểm thử có xét đến dependency.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The test suite is mostly made up of test methods for each function (or array object method) in the spec. The majority of these tests require other functions to do everything we want, which is problematic when an underlying function does not work—you'll get a lot of spammy errors that actually relate to a single fundamental problem... or even false positives.
So I think it would be a good idea if we declared the dependencies of each test method, i.e. the functions we use and assume has correct behaviour. We could use these declarations to create a dependency graph, which could be hooked with pytest to prioritise zero/low-dependency tests first, and by default skipping tests that use functions we've deemed incorrect. This will benefit:
- Array API adoptors, who would much more easily see what they should prioritise developing
- Us, who'd be able to see areas where we can try to cut down the functions we depend on
Ideas for declaring dependencies per test method:
- Decorator which lists function and method names
- Automatically infer dependencies via looking at function code (either searching the code as string, or using the AST)
General challenges would be:
- How to get pytests collection hook to do this
- Supporting array object methods alongside the top-level functions
- As well as operator symbols
The dependency graph + auto skipping would also allow us to:
- Remove some mirrored functions in
array_helpers - Remove the module stubbing mechanism
- Check that no tests is using the function they're testing for assertions
- Ngôn ngữ chính
- Python
- Star
- 74
- Fork
- 54
- Merge trung bình
- 4 giờ 35 phút
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của data-apis/array-api-tests
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 87/100
data-apis/array-api-tests#465 · 1 bình luận ·
-
Test reflected operators? Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
data-apis/array-api-tests#460 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
data-apis/array-api-tests#455 · 2 bình luận ·
-
tracking
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
data-apis/array-api-tests#381 · 9 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
data-apis/array-api-tests#379 · 10 bình luận ·
Tất cả issue của data-apis/array-api-tests
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
xinnan-tech/xiaozhi-fde-talk#263 ·
-
rules
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
huggingface/Repo2RLEnv#163 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
huggingface/sentence-transformers#4074 ·
-
comp/dashboard invalid P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
NousResearch/hermes-agent#121143 ·