Skip to content

ci: add pytest suite and GitHub Actions workflow - #36

Merged
stevenang merged 1 commit into
masterfrom
ci/add-test-workflow
Apr 5, 2026
Merged

stevenang merged 1 commit into
masterfrom
ci/add-test-workflow

Conversation

@stevenang

Copy link
Copy Markdown
Owner

Summary

  • New tests/test_modules.py with 24 pytest tests across two categories:
    • Regression tests (16): run every NIST test module against data/data.e (1M bits, deterministic) and pin known-good p-values to 6 significant figures — any implementation change that shifts a result will be caught
    • Guard tests (8): verify that short/insufficient input never raises a Python exception and returns the expected failure indicator
  • New .github/workflows/ci.yml: runs pytest tests/ -v on every push and PR targeting master — merges are blocked until all 24 tests pass

Test plan

  • Confirm all 24 tests pass in the Actions tab after push
  • Verify the workflow blocks a PR that breaks a test (e.g. try reverting a p-value fix)

🤖 Generated with Claude Code

tests/test_modules.py covers two categories:
- Regression tests against data/data.e (1M bits, deterministic) that
  pin known-good p-values to 6 significant figures for all 15 NIST tests
- Guard tests that verify short/invalid input never raises a Python
  exception and returns the expected failure indicator

.github/workflows/ci.yml runs the suite on every push and PR targeting
master, blocking merges until all 24 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@stevenang
stevenang merged commit 428f103 into master Apr 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant