Skip to content

Commit

Permalink
Disable TranslationProgressTotaliser to fix tests with Sphinx 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mitya57 committed Aug 5, 2023
1 parent cd11906 commit 5a31704
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/conftest.py
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path
from bs4 import BeautifulSoup
from sphinx.testing.path import path
import sphinx.transforms.i18n

from sphinx_tabs.tabs import FILES

Expand All @@ -21,9 +22,18 @@ def rootdir():
return path(__file__).parent.abspath() / "roots"


@pytest.fixture(autouse=True)
def remove_translation_progress_transform(app):
if hasattr(sphinx.transforms.i18n, "TranslationProgressTotaliser"):
app.registry.transforms.remove(
sphinx.transforms.i18n.TranslationProgressTotaliser
)


@pytest.fixture(autouse=True)
def auto_build_and_check(
app,
remove_translation_progress_transform,
status,
warning,
check_build_success,
Expand Down
1 change: 1 addition & 0 deletions tests/test_build.py
Expand Up @@ -30,6 +30,7 @@ def test_conditional_assets(app, docname, check_asset_links):
@pytest.mark.sphinx(testroot="conditionalassets-policy")
def test_conditional_assets_html_assets_policy(
app,
remove_translation_progress_transform,
docname,
status,
warning,
Expand Down

0 comments on commit 5a31704

Please sign in to comment.