@@ -49,7 +49,7 @@ def test_instantiation(
4949
5050
5151@pytest .mark .sphinx ('html' , testroot = 'root' )
52- def test_events (app ) :
52+ def test_events (app : SphinxTestApp ) -> None :
5353 def empty ():
5454 pass
5555
@@ -76,27 +76,27 @@ def mock_callback(a_app, *args):
7676
7777
7878@pytest .mark .sphinx ('html' , testroot = 'root' )
79- def test_emit_with_nonascii_name_node (app ) :
79+ def test_emit_with_nonascii_name_node (app : SphinxTestApp ) -> None :
8080 node = nodes .section (names = ['\u65e5 \u672c \u8a9e ' ])
8181 app .emit ('my_event' , node )
8282
8383
8484@pytest .mark .sphinx ('html' , testroot = 'root' )
85- def test_extensions (app ) :
85+ def test_extensions (app : SphinxTestApp ) -> None :
8686 app .setup_extension ('shutil' )
8787 warning = strip_escape_sequences (app .warning .getvalue ())
8888 assert "extension 'shutil' has no setup() function" in warning
8989
9090
9191@pytest .mark .sphinx ('html' , testroot = 'root' )
92- def test_extension_in_blacklist (app ) :
92+ def test_extension_in_blacklist (app : SphinxTestApp ) -> None :
9393 app .setup_extension ('sphinxjp.themecore' )
9494 msg = strip_escape_sequences (app .warning .getvalue ())
9595 assert msg .startswith ("WARNING: the extension 'sphinxjp.themecore' was" )
9696
9797
9898@pytest .mark .sphinx ('html' , testroot = 'add_source_parser' )
99- def test_add_source_parser (app ) :
99+ def test_add_source_parser (app : SphinxTestApp ) -> None :
100100 assert set (app .config .source_suffix ) == {'.rst' , '.test' }
101101
102102 # .rst; only in :confval:`source_suffix`
@@ -110,7 +110,7 @@ def test_add_source_parser(app):
110110
111111
112112@pytest .mark .sphinx ('html' , testroot = 'extensions' )
113- def test_add_is_parallel_allowed (app ) :
113+ def test_add_is_parallel_allowed (app : SphinxTestApp ) -> None :
114114 logging .setup (app , app .status , app .warning )
115115
116116 assert app .is_parallel_allowed ('read' ) is True
@@ -155,14 +155,14 @@ def test_add_is_parallel_allowed(app):
155155
156156
157157@pytest .mark .sphinx ('dummy' , testroot = 'root' )
158- def test_build_specific (app ) :
159- app .builder .build = Mock ()
158+ def test_build_specific (app : SphinxTestApp ) -> None :
159+ app .builder .build = Mock () # type: ignore[method-assign,misc]
160160 filenames = [
161161 app .srcdir / 'index.txt' , # normal
162162 app .srcdir / 'images' , # without suffix
163163 app .srcdir / 'notfound.txt' , # not found
164164 app .srcdir / 'img.png' , # unknown suffix
165- '/index.txt' , # external file
165+ Path ( '/index.txt' ), # external file
166166 app .srcdir / 'subdir' , # directory
167167 app .srcdir / 'subdir/includes.txt' , # file on subdir
168168 app .srcdir / 'subdir/../subdir/excluded.txt' , # not normalized
0 commit comments