Remove type check overrides for `tests/test_extensions/test_ext_githubpages.py` (#13306)

This commit is contained in:
Adam Dangoor
2025-02-07 14:43:27 +00:00
committed by GitHub
parent 6de28062fc
commit d2627c44f3
2 changed files with 8 additions and 4 deletions

View File

@@ -248,7 +248,6 @@ module = [
"tests.test_extensions.test_ext_coverage",
"tests.test_extensions.test_ext_duration",
"tests.test_extensions.test_ext_extlinks",
"tests.test_extensions.test_ext_githubpages",
"tests.test_extensions.test_ext_graphviz",
"tests.test_extensions.test_ext_ifconfig",
"tests.test_extensions.test_ext_imgconverter",

View File

@@ -2,11 +2,16 @@
from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
if TYPE_CHECKING:
from sphinx.testing.util import SphinxTestApp
@pytest.mark.sphinx('html', testroot='ext-githubpages')
def test_githubpages(app):
def test_githubpages(app: SphinxTestApp) -> None:
app.build(force_all=True)
assert (app.outdir / '.nojekyll').exists()
assert not (app.outdir / 'CNAME').exists()
@@ -17,7 +22,7 @@ def test_githubpages(app):
testroot='ext-githubpages',
confoverrides={'html_baseurl': 'https://sphinx-doc.github.io'},
)
def test_no_cname_for_github_io_domain(app):
def test_no_cname_for_github_io_domain(app: SphinxTestApp) -> None:
app.build(force_all=True)
assert (app.outdir / '.nojekyll').exists()
assert not (app.outdir / 'CNAME').exists()
@@ -28,7 +33,7 @@ def test_no_cname_for_github_io_domain(app):
testroot='ext-githubpages',
confoverrides={'html_baseurl': 'https://sphinx-doc.org'},
)
def test_cname_for_custom_domain(app):
def test_cname_for_custom_domain(app: SphinxTestApp) -> None:
app.build(force_all=True)
assert (app.outdir / '.nojekyll').exists()
assert (app.outdir / 'CNAME').read_text(encoding='utf8') == 'sphinx-doc.org'