skip tests whose optional dependency is not installed

With pywikidiff2 and mediawiki-utilities no longer installed by default,
the tests covering --diff, -p wikidiff2, and -p legacy cannot run on a
base install. Mark them so a base install reports skips rather than
failures, and keep the markers in wikiq_test_utils.py so all three test
modules share one definition of what each feature needs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
(cherry picked from commit 59d5a9d46a04320bad5d81e0edf5ecd11f9c2a9b)
This commit is contained in:
2026-08-13 11:58:30 -07:00
parent 70b0ebcf0c
commit b10a7d0130
4 changed files with 36 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ from wikiq_test_utils import (
TEST_OUTPUT_DIR,
WIKIQ,
WikiqTester,
requires_pywikidiff2,
)
@@ -65,6 +66,7 @@ def test_resume():
assert_frame_equal(df_full, df_resumed)
@requires_pywikidiff2
def test_resume_with_diff():
"""Test that --resume correctly computes diff values after resume.
@@ -305,6 +307,7 @@ def test_resume_data_equivalence():
assert_frame_equal(df_full, df_resumed)
@requires_pywikidiff2
def test_resume_with_persistence():
"""Test that --resume correctly handles persistence state after resume.
@@ -403,6 +406,7 @@ def test_resume_corrupted_jsonl_last_line():
assert_frame_equal(df_full, df_resumed)
@requires_pywikidiff2
def test_resume_diff_persistence_combined():
"""Test that --resume correctly handles both diff and persistence state together.
@@ -448,6 +452,7 @@ def test_resume_diff_persistence_combined():
assert_frame_equal(df_full, df_resumed)
@requires_pywikidiff2
def test_resume_mid_page():
"""Test resume from the middle of a page with many revisions.
@@ -501,6 +506,7 @@ def test_resume_mid_page():
assert_frame_equal(df_full, df_resumed)
@requires_pywikidiff2
def test_resume_page_boundary():
"""Test resume at the exact start of a new page.