Enhancement: add test file validation to test-sdist action#21
Merged
Conversation
Adds check_test_files.py to verify the unpacked sdist contains a test directory with at least one test_ file, respecting testpaths from pyproject.toml. Includes a test script with cases for all supported configurations, wired into the test_scripts workflow job.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
check_test_files.pyto thetest-sdistaction that verifies the unpacked sdist contains a test directory with at least onetest_*filetestpathsfrom[tool.pytest.ini_options]or[tool.pytest]inpyproject.toml; falls back to top-leveltest/ortests/test_check_test_files.shwith cases covering all supported configurations, wired into thetest_scriptsworkflow jobTest plan
tests/test_foo.py→ passtest/test_bar.py→ passtests/with notest_*files → fail[tool.pytest.ini_options] testpathspointing to dir withtest_*file → pass[tool.pytest] testpathspointing to dir withtest_*file → passtestpathspointing to dir with notest_*files → fail