ring/default/lib/artifact-index/tests/__init__.py
Fred Amaral ea415ba471
test(artifact-index): add comprehensive pytest suite for Python modules
Add 64 unit tests covering the artifact-index Python modules:

- TestParseFrontmatter: YAML extraction, malformed input, edge cases
- TestParseSections: markdown section extraction by header level
- TestParseHandoff: file parsing, session/task extraction, outcome mapping
- TestExtractFilesFromContent: path extraction with line numbers
- TestEscapeFts5Query: FTS5 query escaping and quoting
- TestValidateLimit: argparse limit validation (1-100 bounds)
- TestGetProjectRoot: .ring/.git directory discovery
- TestGetHandoffIdFromFile: deterministic ID generation

These tests address the code review finding that the artifact-index
infrastructure had zero test coverage despite being foundational.
2025-12-28 00:14:35 -03:00

1 line
35 B
Python

# Tests for artifact-index modules