Incompatibility with pytest-forked
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu với reproducer test_tmp.py được cung cấp và chạy lệnh pytest đã cho cùng các tùy chọn pytest-forked và rerunfailures. Theo dõi cách lời gọi kết hợp --forked, --reruns và --only-rerun được xử lý, sau đó thêm một regression test và xác nhận rằng hành vi rerun mong muốn hoạt động nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
import time
import json
import pytest
import numpy as np
def test_TMP():
np.random.seed(int(time.time()))
if np.random.rand() > 0.2:
qByUser = "1e"
json.loads(qByUser).decode("utf-8")
pytest --reruns=10 --reruns-delay=1 --only-rerun=JSONDecodeError --forked test_tmp.py
============================================================================================================================= test session starts ==============================================================================================================================
platform linux -- Python 3.10.12, pytest-8.4.2, pluggy-1.6.0
Test order randomisation NOT enabled. Enable with --random-order or --random-order-bucket=<bucket_type>
rootdir: /mnt/home/duburcqa/workspace/src
plugins: dash-3.2.0, forked-1.6.0, print-1.2.0, random-order-1.2.0, rerunfailures-15.1, xdist-3.8.0, syrupy-5.0.0
collected 1 item
test_tmp.py F [100%]
=================================================================================================================================== FAILURES ===================================================================================================================================
___________________________________________________________________________________________________________________________________ test_TMP ___________________________________________________________________________________________________________________________________
def test_TMP():
np.random.seed(int(time.time()))
if np.random.rand() > 0.2:
qByUser = "1e"
> qUserData = json.loads(qByUser).decode("utf-8")
test_tmp.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7313fb84efe0>, s = '1e', _w = <built-in method match of re.Pattern object at 0x7313fb9075e0>
def decode(self, s, _w=WHITESPACE.match):
"""Return the Python representation of ``s`` (a ``str`` instance
containing a JSON document).
"""
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
end = _w(s, end).end()
if end != len(s):
> raise JSONDecodeError("Extra data", s, end)
E json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
/usr/lib/python3.10/json/decoder.py:340: JSONDecodeError
=========================================================================================================================== short test summary info ============================================================================================================================
FAILED test_tmp.py::test_TMP
============================================================================================================================== 1 failed in 0.13s ===============================================================================================================================
- Ngôn ngữ chính
- Python
- Star
- 480
- Fork
- 110
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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-rerunfailures
-
Zero rerun delay can abort with OverflowError for a large finite backoff factorCó thể đã có người làm @AryanRG đã nhận 9 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Non-finite rerun delay settings abort pytest with INTERNALERRORCó thể đã có người làm @Arham-Begani đã nhận 7 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
fail-on-flaky returns success after a rerun with xdistCó thể đã có người làm @harbinresearcher đã nhận 10 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
pytest-dev/pytest-rerunfailures#326 · 7 bình luận ·
-
Add ability to raise runtime warnings on rerunsCó thể đã có người làm @LouisDeconinck đã nhận 38 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-rerunfailures#318 · 2 bình luận ·
Tất cả issue của pytest-dev/pytest-rerunfailures
Issue tương tự
-
[Resource] agent-claimcheckĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
yzhao062/awesome-auditable-ai#45 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
NVIDIA/flare-local-inference#90 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/streaming comp/gateway P2 platform/telegram type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#144897 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
request-theme
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
LizardByte/ThemerrDB#9575 ·
Maintainer thường phản hồi trong vòng 1 ngày