Celery tests require package; test blows up if Celery not installed instead of skipping the tests gracefully
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
tests/test_pytest_cov.py の test_celery 付近から始め、Celery が利用できない場合に small_celery.py がどのように収集されるかを確認します。Celery のない環境でそのテストを実行し、収集中に失敗するのではなく、テストが適切にスキップされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
Expected vs actual result
Expected
Tests should be skipped if Celery isn't installed.
Actual
Tests blow up with an ImportError similar to what's provided at the bottom of the report.
Reproducer
Attempt to run tests on host without Celery installed.
Versions
% python3 -V; uname -sr
Python 3.12.13
FreeBSD 15.1-RELEASE-p1
Version being tested/installed is vanilla 7.1.0.
Config
n/a
Code
% cd devel/py-pytest-cov
% sudo make test
...
<...>/freebsd-ports/devel/py-pytest-cov/work-py312/pytest_cov-7.1.0/tests/test_pytest_cov.py:771: Failed
------------------------------------------------------------------------------------------------------------ Captured stdout call -------------------------------------------------------------------------------------------------------------
running: /usr/local/bin/python3.12 -mpytest --basetemp=/tmp/pytest-of-root/pytest-0/test_celery0/runpytest-0 -vv -s --cov --cov-report=term-missing small_celery.py --basetemp=/tmp/pytest-of-root/pytest-0/basetemp
in: /tmp/pytest-of-root/pytest-0/test_celery0
============================= test session starts ==============================
platform freebsd15 -- Python 3.12.13, pytest-8.4.2, pluggy-1.6.0 -- /usr/local/bin/python3.12
cachedir: .pytest_cache
hypothesis profile 'default'
rootdir: /tmp/pytest-of-root/pytest-0/test_celery0
configfile: pyproject.toml
plugins: hypothesis-6.155.7, cov-7.1.0, xdist-3.8.0, flaky-3.8.1
collecting ... collected 0 items / 1 error
==================================== ERRORS ====================================
_______________________ ERROR collecting small_celery.py _______________________
ImportError while importing test module '/tmp/pytest-of-root/pytest-0/test_celery0/small_celery.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.12/site-packages/_pytest/python.py:498: in importtestmodule
mod = import_path(
/usr/local/lib/python3.12/site-packages/_pytest/pathlib.py:587: in import_path
importlib.import_module(module_name)
/usr/local/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
???
<frozen importlib._bootstrap>:1360: in _find_and_load
???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:935: in _load_unlocked
???
/usr/local/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
exec(co, module.__dict__)
small_celery.py:3: in <module>
from celery import Celery
E ModuleNotFoundError: No module named 'celery'
=========================== short test summary info ============================
ERROR small_celery.py
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.48s ===============================
- 主要言語
- Python
- スター
- 2.1k
- フォーク
- 253
- 平均マージ
- 12日 4時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pytest-dev/pytest-cov のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pytest-dev/pytest-cov#617 · コメント 1 件 ·
-
Only set dynamic context on coveragepy cores supporting it, perhaps?対応中かも @terminalchai が 11 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
pytest-dev/pytest-cov#755 · コメント 3 件 ·
-
INTERNALERROR when generating html report using pytest-cov 7.1.0 with jinja対応中かも @daleselaji-dev が 82 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
pytest-dev/pytest-cov#748 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
pytest-dev/pytest-cov#747 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
pytest-dev/pytest-cov#746 · コメント 2 件 ·
pytest-dev/pytest-cov の issue をすべて見る
似ている issue
-
ai_p2 bug comp-datalake
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ClickHouse/ClickHouse#128306 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are dropped対応中かも @sohom-cs が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
Arize-ai/openinference#4199 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
MichaelYcJo/SpecSeal#1192 ·