Add pytest test suite and replace pylint with ruff#24
Merged
hyperfinitism merged 4 commits intomainfrom Mar 5, 2026
Merged
Conversation
9b6d8a7 to
398d7bc
Compare
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
Add a comprehensive test suite and modernize the CI linting/formatting pipeline.
Tests (
tests/)test_types.py—pysnputils.types(helper functions, enums, bitfield types,AttestationReportparsing)test_fetch.py—pysnputils.fetch(KDS URL generation, fetch functions with mocked HTTP)test_verify.py—pysnputils.verify(certificate chain validation, report signature verification with real ECDSA-P384 signing)test_examples.py—examples/*.pyCLI scripts (argument parsing, output format, mocked I/O)conftest.pywith shared fixtures and helpers (synthetic report builder, certificate generators).github/workflows/pytest.ymlCI workflow (Python 3.11 / 3.12)Linter / Formatter: pylint → ruff
.pylintrcand.github/workflows/pylint.yml[tool.ruff]configuration inpyproject.tomltoo-many-arguments,too-many-locals, etc.).github/workflows/ruff.yml(ruff check+ruff format --check)Other
requires-python, pytest matrix)pylintwithruffin[project.optional-dependencies]Tests
ruff check .— all checks passedruff format --check .— all 13 files formattedpytest tests -v— 116/116 passed