Problem Description
Test coverage for the local binary parsers is quite low: pytorch.py is at 21% and safetensors.py is at 45%.
Proposed Solution
- Review the existing
tests/test_parsers.py.
- Construct simple, dummy binary files (using
struct.pack) inside the tests to simulate valid and invalid .safetensors and .pt headers.
- Assert that the parsers correctly raise
ValueError or successfully extract the metadata without needing to commit heavy .safetensors files to the git repository.
Alternatives Considered
No response
Additional Context
No response
Problem Description
Test coverage for the local binary parsers is quite low:
pytorch.pyis at 21% andsafetensors.pyis at 45%.Proposed Solution
tests/test_parsers.py.struct.pack) inside the tests to simulate valid and invalid.safetensorsand.ptheaders.ValueErroror successfully extract the metadata without needing to commit heavy.safetensorsfiles to the git repository.Alternatives Considered
No response
Additional Context
No response