Skip to content

Commit d2d7985

Browse files
committed
Update for latest beautifulsoup.
1 parent 76307a3 commit d2d7985

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tests/test_output/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
# stdlib
3030
import random
31-
from typing import Any, Dict, NamedTuple, Sequence, Tuple
31+
from typing import Any, Dict, Iterator, NamedTuple, Sequence, Tuple
3232

3333
# 3rd party
3434
import pytest
35-
from bs4 import BeautifulSoup # type: ignore
35+
from bs4 import BeautifulSoup
3636
from domdf_python_tools.paths import PathPlus
3737
from sphinx.testing.fixtures import app, make_app, shared_result, sphinx_test_tempdir, test_params
3838
from sphinx.testing.path import path
@@ -107,7 +107,7 @@ def app_params(
107107

108108

109109
@pytest.fixture()
110-
def page(app, request, monkeypatch) -> BeautifulSoup:
110+
def page(app, request, monkeypatch) -> Iterator[BeautifulSoup]:
111111
random.seed("5678")
112112

113113
app.build(force_all=True)

tests/test_output/test_output.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33

44
# 3rd party
55
import pytest
6-
from bs4 import BeautifulSoup # type: ignore
6+
from bs4 import BeautifulSoup
77
from domdf_python_tools.paths import PathPlus
88
from pytest_regressions.file_regression import FileRegressionFixture
9+
from sphinx.application import Sphinx
910

1011

11-
def test_build_example(app):
12+
def test_build_example(app: Sphinx):
1213
app.build()
1314
app.build()
1415

@@ -20,11 +21,11 @@ def test_html_output(page: BeautifulSoup, file_regression: FileRegressionFixture
2021

2122

2223
@pytest.mark.sphinx("latex", srcdir="test-root")
23-
def test_latex_output(app):
24+
def test_latex_output(app: Sphinx):
2425
random.seed("5678")
2526

2627
assert app.builder.name.lower() == "latex"
2728
app.build()
2829

29-
assert not PathPlus(app.outdir / "_debug" / "index.html").is_file()
30-
assert not PathPlus(app.outdir / "_debug").is_dir()
30+
assert not PathPlus(app.outdir / "_debug" / "index.html").is_file() # type: ignore[operator]
31+
assert not PathPlus(app.outdir / "_debug").is_dir() # type: ignore[operator]

0 commit comments

Comments
 (0)