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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user