[tests] skip tests that need remote content if host is offline (#12091)

This commit is contained in:
Bénédikt Tran
2024-03-14 15:33:24 +01:00
committed by GitHub
parent 23dd754f63
commit 98d0cc8602
3 changed files with 66 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import docutils
import pytest
@pytest.mark.usefixtures('if_online')
@pytest.mark.sphinx('html', testroot='images')
def test_html_remote_images(app, status, warning):
app.build(force_all=True)
@@ -24,6 +25,7 @@ def test_html_encoded_image(app, status, warning):
assert (app.outdir / '_images/img_#1.png').exists()
@pytest.mark.usefixtures('if_online')
@pytest.mark.sphinx('html', testroot='remote-logo')
def test_html_remote_logo(app, status, warning):
app.build(force_all=True)

View File

@@ -1398,6 +1398,7 @@ def test_latex_raw_directive(app, status, warning):
assert 'LaTeX: abc def ghi' in result
@pytest.mark.usefixtures('if_online')
@pytest.mark.sphinx('latex', testroot='images')
def test_latex_images(app, status, warning):
app.build(force_all=True)