Skip to content

[IMPROVEMENT] Add test case for cascade-failure behavior in nicediff#1088

Open
Hell1213 wants to merge 2 commits intoCCExtractor:masterfrom
Hell1213:add-cascade-failure-test
Open

[IMPROVEMENT] Add test case for cascade-failure behavior in nicediff#1088
Hell1213 wants to merge 2 commits intoCCExtractor:masterfrom
Hell1213:add-cascade-failure-test

Conversation

@Hell1213
Copy link
Copy Markdown
Contributor

@Hell1213 Hell1213 commented Apr 2, 2026

[IMPROVEMENT]

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have never used the project.
  • I have used the project briefly.
  • I have used the project extensively, but have not contributed previously.
  • I am an active contributor to the project.

Adds test case to document cascade-failure behavior in nicediff comparison algorithm.

Fixes #1087

What This Does

When comparing subtitle files where one file is missing an entry, the current line-by-line comparison causes all subsequent lines to mismatch. This test documents that behavior for future reference when implementing the frame-offset-tolerant comparison algorithm planned for the GSoC Sample Platform NG project.

Changes

Added test_cascade_failure_missing_entry() to tests/test_test/test_diff.py that creates a scenario where subtitle entry 2 is missing and verifies the cascade behavior occurs.

Testing

python -m unittest tests.test_test.test_diff -v

All tests pass.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

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.

Add test case to document cascade-failure behavior in nicediff comparison

1 participant