Bad and misleading test
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 48/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
Bắt đầu với test_not_main_thread.py và xem xét pull request cùng commit đã đưa nó vào. Chạy test để xác nhận liệu quá trình collection có thất bại trước bất kỳ assertion nào hay không, sau đó xác định hành vi timeout dự kiến và làm cho test thực thi hành vi đó. Hoàn tất khi test không còn pass hoặc fail chỉ vì thiếu pytest_timeout.timeout_setup.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I believe there's a test that is not testing anything anymore.
The test was introduced in https://github.com/pytest-dev/pytest-timeout/pull/88, https://github.com/pytest-dev/pytest-timeout/commit/1a35f94298c1260500907bd674b75cf59df0c949
================================================================================================ test session starts ================================================================================================
platform linux -- Python 3.10.2, pytest-7.4.3, pluggy-1.3.0
rootdir: /tmp/pytest-of-vampas/pytest-4/test_not_main_thread0
plugins: github-actions-annotate-failures-0.2.0, timeout-2.2.0, cov-4.1.0
timeout: 1.0s
timeout method: signal
timeout func_only: False
collected 0 items / 1 error
====================================================================================================== ERRORS =======================================================================================================
_____________________________________________________________________________________ ERROR collecting test_not_main_thread.py ______________________________________________________________________________________
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/runner.py:341: in from_call
result: Optional[TResult] = func()
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/runner.py:372: in <lambda>
call = CallInfo.from_call(lambda: list(collector.collect()), "collect")
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/python.py:531: in collect
self._inject_setup_module_fixture()
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture
self.obj, ("setUpModule", "setup_module")
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/python.py:310: in obj
self._obj = obj = self._getobj()
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/python.py:528: in _getobj
return self._importtestmodule()
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/python.py:617: in _importtestmodule
mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/pathlib.py:567: in import_path
importlib.import_module(module_name)
/home/vampas/.pyenv/versions/3.10.2/lib/python3.10/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1050: in _gcd_import
???
<frozen importlib._bootstrap>:1027: in _find_and_load
???
<frozen importlib._bootstrap>:1006: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:688: in _load_unlocked
???
/home/vampas/projects/SaltStack/pytest/timeout/hotfix/settings-hook/.tox/py310/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
exec(co, module.__dict__)
test_not_main_thread.py:4: in <module>
current_timeout_setup = pytest_timeout.timeout_setup
E AttributeError: module 'pytest_timeout' has no attribute 'timeout_setup'
============================================================================================== short test summary info ==============================================================================================
ERROR test_not_main_thread.py - AttributeError: module 'pytest_timeout' has no attribute 'timeout_setup'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================= 1 error in 0.20s ==================================================================================================
Is this really what is getting tested? The error?
- Ngôn ngữ chính
- Python
- Star
- 260
- Fork
- 70
- 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
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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-timeout
-
PR #200 introduced breaking change - `timeout` value in config is incompatible with older versionsCó thể đã có người làm @Sanjays2402 đã nhận 45 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
pytest-dev/pytest-timeout#203 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pytest-dev/pytest-timeout#190 · 9 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
pytest-dev/pytest-timeout#189 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
pytest-dev/pytest-timeout#181 · 4 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
pytest-dev/pytest-timeout#178 · 1 bình luận ·
Tất cả issue của pytest-dev/pytest-timeout
Issue tương tự
-
area: desktop area: website priority: P2 type: feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
appandflow/stim#3411 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 88/100
baptistehamon/lsapy#185 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
PolicyEngine/policyengine-us#10073 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
syedhamidali/radarx#277 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Arekkazu/sgpmp-backend#549 ·
Maintainer thường phản hồi trong vòng 1 ngày