Skip to content

Improve test coverage#14

Merged
farukalpay merged 4 commits intomainfrom
claude/testing-mi34zkd8ivxgnqxq-012o4Fi3tbJK6BiXJixhYtia
Nov 17, 2025
Merged

Improve test coverage#14
farukalpay merged 4 commits intomainfrom
claude/testing-mi34zkd8ivxgnqxq-012o4Fi3tbJK6BiXJixhYtia

Conversation

@farukalpay
Copy link
Copy Markdown
Owner

No description provided.

Improve test coverage by adding tests for previously untested or under-tested modules:

- test_assertions.py: 30+ tests for cryptographic signing and JSON Lines output
- test_schema_comprehensive.py: 33 tests for XSD/RELAX NG validation
- test_engine_wrapper.py: 20 tests for engine integration (100% passing)
- test_cli_new.py: 39 tests for modern Typer CLI

Source code fixes discovered through testing:
- Add metadata field to ValidationResult for schema validation
- Add contraction_operator and projection_operator helper functions
- Add ProofGenerator class for CLI proof commands

These tests reveal several source code bugs that need attention:
- XSD derivation incorrectly handles XML namespaces
- RELAX NG caching fails due to unpicklable objects
- Typer version compatibility issues in CLI
- Fix ConvergenceResult API usage in cli_new.py (use is_converged(), metrics.iterations)
- Fix XSD derivation namespace handling in schema.py (use nsmap instead of attrib)
- Fix RELAX NG cache TypeError handling in cache.py
- Update Typer version constraint to support >=0.9.0 in pyproject.toml
- Update CLI schema derive command to accept string argument for Typer compatibility
- Update test expectations to match corrected API

All 615 tests now pass.
These files are generated during test runs and should be ignored.
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 37.03704% with 51 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
xml_lib/engine/proofs.py 19.04% 51 Missing ⚠️

📢 Thoughts on this report? Let us know!

@farukalpay farukalpay merged commit f50bbef into main Nov 17, 2025
14 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.

3 participants