skip test_infobox when its fixture files are absent

test_infobox reads test/test_diff_revisions/test_infobox_from and
test_infobox_to, which were never committed to the repository, so the
test always failed with FileNotFoundError. Skip it when the fixtures
are missing so it runs again if they are ever added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-06 15:34:48 -07:00
parent 791be0aa56
commit 83b7fc0210

View File

@@ -1,5 +1,6 @@
from itertools import chain
from functools import partial
import os
import re
import pytest
import pytest_asyncio
@@ -278,6 +279,10 @@ def test_paragraph_move_and_change():
assert_equal_enough(a, rev1)
assert_equal_enough(b, rev2)
@pytest.mark.skipif(
not os.path.exists("test/test_diff_revisions/test_infobox_from"),
reason="test_infobox_from/_to fixture files are not in the repository",
)
def test_infobox():
rev1 = open("test/test_diff_revisions/test_infobox_from").read()
rev2 = open("test/test_diff_revisions/test_infobox_to").read()