Repository navigation
test: certificate content tests, simple_mutation tests, fix CWD path - #20
Merged
Merged
Conversation
…ependent schema path - tests/test_certificate.py: 22 new tests for build_certificate content (all fields, hash stability, ISO timestamp, schema validation) - tests/test_simple_mutation.py: 20 new tests for mutate_sequence (edge cases, determinism, canonical AA guarantee, length preservation) - tests/test_certificate_schema.py: anchor schema path to repo root via Path(__file__).parents[1] so test passes regardless of CWD 662 tests total (was 620).
…bstitution test, update schema - test_unseeded_calls_can_differ: add explanatory comment on entropy source + assertion message - test_single_mutation_can_produce_identity_substitution: new test verifying choice(CANONICAL_AA) can land on the existing residue (Hamming=0 intentional) - schemas/candidate.schema.json: add 'source' (string) and 'nearest_reference' (object | null) to properties; these were emitted by build_certificate but not declared in the schema - tests/test_certificate.py: replace redundant schema-validation test with test_returns_dict; remove unused imports (validate_json_schema, Path)
3 tasks done
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
tests/test_certificate.pycovering allbuild_certificatefields — ID/sequence/source passthrough, scores, nearest_reference (None and set), references_checked, selection_reason, known_failure_modes, recommended_next_steps disclaimers, ISO timestamp format, pipeline version, config_hash stability and diff-sensitivity, required-keys set, schema validationtests/test_simple_mutation.pycoveringmutate_sequenceedge cases: empty sequence, mutations=0 and negative, length preservation, canonical-AA-only output, Hamming ≤ 1 for single mutation, seed determinism, unseeded randomnesstests/test_certificate_schema.py: replaced CWD-dependent"schemas/candidate.schema.json"with anchoredPath(__file__).parents[1] / "schemas" / "candidate.schema.json"so the test passes when invoked from any directoryTest plan