In raising this issue, I confirm the following:
My familiarity with the project is as follows:
Proposal
Add a test case to document the current cascade-failure behavior of the nicediff comparison algorithm when subtitle entries are missing.
Motivation
The nicediff module currently lacks test coverage for the cascade-failure scenario. When comparing subtitle files where one file is missing an entry (e.g., entry #2 is missing), the line-by-line comparison algorithm cascades the mismatch to subsequent entries. This behavior should be documented with a test case for:
- Future Reference: When implementing the frame-offset-tolerant comparison algorithm (planned for GSoC Sample Platform NG project), developers need to understand the current behavior
- Test Coverage: Improve test coverage for edge cases in subtitle comparison
- Regression Prevention: Ensure this behavior is maintained or intentionally changed in future updates
Proposed Changes
Add test_cascade_failure_missing_entry() to tests/test_test/test_diff.py that:
- Creates two subtitle lists where one is missing an entry
- Verifies the diff output contains both the missing and mismatched entries
- Documents the current cascade behavior
Benefits
- Better test coverage for nicediff edge cases
- Documentation of current algorithm behavior
- Reference point for future algorithm improvements
- No changes to existing code logic
In raising this issue, I confirm the following:
My familiarity with the project is as follows:
Proposal
Add a test case to document the current cascade-failure behavior of the nicediff comparison algorithm when subtitle entries are missing.
Motivation
The nicediff module currently lacks test coverage for the cascade-failure scenario. When comparing subtitle files where one file is missing an entry (e.g., entry #2 is missing), the line-by-line comparison algorithm cascades the mismatch to subsequent entries. This behavior should be documented with a test case for:
Proposed Changes
Add
test_cascade_failure_missing_entry()totests/test_test/test_diff.pythat:Benefits