Skip to content

Enhancement: add test file validation to test-sdist action#21

Merged
blink1073 merged 2 commits into
Calysto:mainfrom
blink1073:test-sdist-validation
Mar 25, 2026
Merged

Enhancement: add test file validation to test-sdist action#21
blink1073 merged 2 commits into
Calysto:mainfrom
blink1073:test-sdist-validation

Conversation

@blink1073
Copy link
Copy Markdown
Contributor

Summary

  • Adds check_test_files.py to the test-sdist action that verifies the unpacked sdist contains a test directory with at least one test_* file
  • Respects testpaths from [tool.pytest.ini_options] or [tool.pytest] in pyproject.toml; falls back to top-level test/ or tests/
  • Adds test_check_test_files.sh with cases covering all supported configurations, wired into the test_scripts workflow job

Test plan

  • tests/test_foo.py → pass
  • test/test_bar.py → pass
  • tests/ with no test_* files → fail
  • No test directory → fail
  • [tool.pytest.ini_options] testpaths pointing to dir with test_* file → pass
  • [tool.pytest] testpaths pointing to dir with test_* file → pass
  • testpaths pointing to dir with no test_* files → fail

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.
@blink1073 blink1073 added the enhancement New feature or request label Mar 25, 2026
@blink1073 blink1073 merged commit a6dd969 into Calysto:main Mar 25, 2026
18 checks passed
@blink1073 blink1073 deleted the test-sdist-validation branch March 25, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant