--cov as final element in addopts creates confusing behaviour
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Start by reproducing the behavior with the shown pyproject.toml configuration and the commands pytest specific/file.py and pytest -s specific/file.py. Trace how the final --cov entry is combined with the selected test path; done means pytest specific/file.py runs only that file while coverage remains enabled.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi there,
I'm not sure this is a pytest bug but here it goes.
I have the following pyproject.toml configuration
[tool.pytest.ini_options]
testpaths = "test"
addopts = [
"--import-mode=importlib", # Recommended by pytest
"--cov",
]
so I can easily use
pytest
to start my tests.
Now when I want to test only a specific file, doing
pytest specific/file.py
ignores the argument, while in the mean time, passing another optional argument such as the following
pytest -s specific/file.py
works perfectly as intended.
Am I missing a piece or is this a pytest-side problem?
Thanks in advance!
All the best.
Élie
- Ngôn ngữ chính
- Python
- Star
- 2.1k
- Fork
- 256
- Merge trung bình
- 6 ngày 10 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 pytest-dev/pytest-cov
-
Celery tests require package; test blows up if Celery not installed instead of skipping the tests gracefullyCó thể đã có người làm @dchaudhari7177 đã nhận 104 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pytest-dev/pytest-cov#750 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pytest-dev/pytest-cov#617 · 1 bình luận ·
-
Only set dynamic context on coveragepy cores supporting it, perhaps?Có thể đã có người làm @terminalchai đã nhận 19 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
pytest-dev/pytest-cov#755 · 3 bình luận ·
-
INTERNALERROR when generating html report using pytest-cov 7.1.0 with jinjaCó thể đã có người làm @daleselaji-dev đã nhận 90 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
pytest-dev/pytest-cov#748 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
pytest-dev/pytest-cov#747 · 1 reaction ·
Tất cả issue của pytest-dev/pytest-cov
Issue tương tự
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Đang mởkind/bug priority/medium qa_automation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
yugabyte/yugabyte-db#37324 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
btclib-org/btclib-node#2260 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Có thể đã có người làm @geyazheng đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
langchain-ai/langchain-aws#1469 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GCToggler leaves collection enabled if the body re-enables itCó thể đã có người làm @Gambit-Checkmate đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 7 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
EESSI/docs#949 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày