Commit 7453393
fix: test_mpeg_consolidated failure due to unregistered save implementation (#404)
## Summary
- Fixed test_mpeg_consolidated test failure by properly registering
animation save implementation
- Added missing `use fortplot_animation` module import to enable save
functionality
- Changed from type-bound method calls to procedure calls to go through
facade module registration
## Root Cause Analysis
The test was failing because:
1. It only imported `fortplot` module, not `fortplot_animation`
2. It used type-bound method `anim%save()` which bypassed the facade
module registration system
3. The save implementation pointer remained unregistered, causing
"Animation save implementation not initialized" errors
## Technical Details
- Animation save functionality requires the facade module
`fortplot_animation` to register the implementation
- Type-bound method `anim%save()` calls core module directly, skipping
registration
- Procedure call `save_animation()` goes through facade module which
triggers registration via `register_save_implementation()`
## Test Results
- MPEG file now generated successfully (1619 bytes with valid MP4
structure)
- Structure validation passes (detects MP4 box headers)
- Error handling works correctly for invalid formats
- No regressions in related tests (test_public_api,
test_new_modules_integration)
## Test Output
```
=== CONSOLIDATED MPEG VALIDATION TESTS ===
TEST: Basic MPEG Generation and Validation
✓ MPEG generation: PASS
✓ File existence: PASS
✓ File size: 1619 bytes
✓ Structure validation: T
TEST: Error Handling
✓ Invalid format rejection: PASS
=== All consolidated MPEG tests passed ===
```
Fixes #388
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 5ce1db0 commit 7453393
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
0 commit comments