Tests fail with pytest 9
まだ誰も着手していません。
評価
調査の方向性
tests/test_update_examples_dir.py と example/test_example.py から始めてください。パラメータ化にジェネレーターが渡されるため、テストの収集に失敗しています。両方のテストでパラメータ化の設定を読み、レポートに含まれる pytest 9 の非推奨化に関するガイダンスを確認してください。両方のテストが収集され、報告された PytestRemovedIn10Warning なしでテストスイートが実行されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The following came up when building version 0.0.18 in Arch Linux, with pytest 9.1.1:
============================= test session starts ==============================
platform linux -- Python 3.14.8, pytest-9.1.1, pluggy-1.7.0 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /build/python-pytest-examples/src/pytest-examples-0.0.18
configfile: pyproject.toml
testpaths: tests, example
plugins: examples-0.0.18, platformdirs-4.13.0
collecting ... collected 66 items / 2 errors
==================================== ERRORS ====================================
______________ ERROR collecting tests/test_update_examples_dir.py ______________
/usr/lib/python3.14/site-packages/pluggy/_caller.py:197: in __call__
return self._hookexec(
/usr/lib/python3.14/site-packages/pluggy/_manager.py:183: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/_pytest/python.py:250: in pytest_pycollect_makeitem
return list(collector._genfunctions(name, obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/_pytest/python.py:476: in _genfunctions
self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
/usr/lib/python3.14/site-packages/pluggy/_caller.py:262: in call_extra
return self._hookexec(self.name, hookimpls, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/pluggy/_manager.py:183: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/_pytest/python.py:124: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
/usr/lib/python3.14/site-packages/_pytest/python.py:1316: in parametrize
argnames, parametersets = ParameterSet._for_parametrize(
/usr/lib/python3.14/site-packages/_pytest/mark/structures.py:202: in _for_parametrize
warnings.warn(
E pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
E Test: tests/test_update_examples_dir.py::test_cases_update, argvalues type: generator
E Please convert to a list or tuple.
E See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
___________________ ERROR collecting example/test_example.py ___________________
/usr/lib/python3.14/site-packages/pluggy/_caller.py:197: in __call__
return self._hookexec(
/usr/lib/python3.14/site-packages/pluggy/_manager.py:183: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/_pytest/python.py:250: in pytest_pycollect_makeitem
return list(collector._genfunctions(name, obj))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/_pytest/python.py:476: in _genfunctions
self.ihook.pytest_generate_tests.call_extra(methods, dict(metafunc=metafunc))
/usr/lib/python3.14/site-packages/pluggy/_caller.py:262: in call_extra
return self._hookexec(self.name, hookimpls, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/pluggy/_manager.py:183: in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/usr/lib/python3.14/site-packages/_pytest/python.py:124: in pytest_generate_tests
metafunc.parametrize(*marker.args, **marker.kwargs, _param_mark=marker)
/usr/lib/python3.14/site-packages/_pytest/python.py:1316: in parametrize
argnames, parametersets = ParameterSet._for_parametrize(
/usr/lib/python3.14/site-packages/_pytest/mark/structures.py:202: in _for_parametrize
warnings.warn(
E pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
E Test: example/test_example.py::test_will_error, argvalues type: generator
E Please convert to a list or tuple.
E See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
=========================== short test summary info ============================
ERROR tests/test_update_examples_dir.py - pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
Test: tests/test_update_examples_dir.py::test_cases_update, argvalues type: generator
Please convert to a list or tuple.
See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
ERROR example/test_example.py - pytest.PytestRemovedIn10Warning: Passing a non-Collection iterable to parametrize is deprecated.
Test: example/test_example.py::test_will_error, argvalues type: generator
Please convert to a list or tuple.
See https://docs.pytest.org/en/stable/deprecations.html#parametrize-iterators
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 2 errors in 0.44s ===============================
- 主要言語
- Python
- スター
- 181
- フォーク
- 29
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pydantic/pytest-examples のほかの issue
-
Clean up Needed対応中かも @Danipulok が 73 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
pydantic/pytest-examples#72 · コメント 5 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
pydantic/pytest-examples#82 ·
-
Feature requrest [I can do it myself if allowed]: Allow configuration of `pytest-examples` from `pyproject.toml`対応中かも @Danipulok が 38 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
pydantic/pytest-examples#73 · コメント 4 件 ·
-
target_versions are out of date対応中かも @stevenh が 507 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
pydantic/pytest-examples#63 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
pydantic/pytest-examples#62 · コメント 1 件 ·
pydantic/pytest-examples の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
OCA/account-invoicing#2529 ·
メンテナーはふだん 1 日以内に返信
-
area/ci
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textオープンbug imagen skills
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Email validation accepts a trailing newline対応中かも @marcello-pichini が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信