validate-pyproject: Many tests fails with `generator raised StopIteration`
I’m seeing 131 tests to fail like this:
FAILED tests/test_pre_compile.py::test_invalid_examples_api[cibuildwheel/overrides-noselect.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[setuptools/07-pyproject.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[cibuildwheel/overrides-noselect.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[setuptools/package-dir/invalid-name.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[localtool/fail2.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[atoml/pyproject.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[pep621/missing-fields/missing-version.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[setuptools/dependencies/invalid-extra-name.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[localtool/working.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[setuptools/packages/missing-find-arguments.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[ruff/modern.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[setuptools/06-pyproject.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[store/ruff-unknown.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[setuptools/pep621/license/both-text-and-file.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[cibuildwheel/unknown-option.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[setuptools/cmdclass/invalid-value.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[cibuildwheel/default.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_invalid_examples_api[setuptools/dynamic/readme-too-many.toml-cli_pre_compile] - RuntimeError: generator raised StopIteration
FAILED tests/test_pre_compile.py::test_examples_api[pep_text/pyproject.toml-api_pre_compile] - RuntimeError: generator raised StopIteration
=========================================== 131 failed, 352 passed, 1 skipped in 361.60s (0:06:01) ===========================================
I tested both the 0.19 sdist and the latest main git branch using tox -e py39.
I found that when I do this: touch src/LICENSE src/LICENSE.txt then all tests pass.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 19 (9 by maintainers)
This is probably related to the change in behaviour?
Let me think how we can better change that. Ideally I would not like to exclude the
srcdirectory from doctests, and remove the separatepytest --doctest-modules srccommand.(The recommended import mode for new projects, i.e. “importlib” also seem to have problems https://github.com/pytest-dev/pytest/issues/7652, which I am hitting when working on this).
In principle no…
According to the docs in
importlib_metadata, Python 3.8 stdlib bundles what would be equivalent toimportlib_metadata==1.4. Thefiles()was introduced in version 0.9. So in theory the version in stdlib should match the needs ofvalidate-pyproject. (Unless there is a bug that never received a fix).Thank you for all the information, I will need to have a deeper look at this problem.
I test using these steps:
AFAIK,
toxinstalls thevalidate-pyprojectso I do not need to do that manually: