pytest 9: read `pytest.toml` and the native `[tool.pytest]` table

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
62/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python, typescript
Lĩnh vực
ci-cd, testing

Hướng nghiên cứu

Start with src/git/git-diff.ts and the existing pytest configuration parsing and tests; the issue depends on #159, so read that first. Add fixtures and tests for pytest.toml, .pytest.toml, [tool.pytest], and precedence, checking how pytest handles both TOML tables. Update PROJECT_FILES and the Python entries in CONFIG_PATTERNS; run npm test and confirm configuration changes fall back with a named reason.

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

Mô tả

adapter bug good first issue

Depends on #159.

pytest 9.0 added two ways to configure it. First, pytest.toml and the hidden .pytest.toml, which come before pytest.ini and match even when empty. Second, a native [tool.pytest] table in pyproject.toml that uses real TOML types. DiffCI reads neither. A pyproject.toml with [tool.pytest] and python_files = ["check_*.py"] gives the defaults today.

Done when:

  • pytest.toml and .pytest.toml are first in the search order. Their settings are under a [pytest] table.
  • [tool.pytest] in pyproject.toml is read like [tool.pytest.ini_options], after #158's list parsing. Take care that the [tool.pytest] pattern doesn't also match [tool.pytest.ini_options] or the reverse. Check what pytest does when both tables are present, and set unreadable if it's unclear.
  • pytest.toml and .pytest.toml are added to PROJECT_FILES and to the Python entries in CONFIG_PATTERNS (src/git/git-diff.ts). A change to either then falls back with a named reason, like pytest.ini.
  • There are tests for each file and the precedence between them.

New to DiffCI? See CONTRIBUTING.md: add a synthetic fixture, run npm test, and sign off commits with git commit -s. Comment here to claim the issue.

Ngôn ngữ chính
TypeScript
Star
0
Fork
4
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
48

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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.

Issue khác của DiffCI/core

Tất cả issue của DiffCI/core

Issue tương tự

Thêm issue về TypeScript

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.