File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import pytest
4
4
5
+ import sphinx
6
+
5
7
pytest_plugins = 'sphinx.testing.fixtures'
6
8
7
9
8
10
@pytest .fixture (scope = 'session' )
9
11
def rootdir ():
12
+ if sphinx .version_info [:2 ] < (7 , 2 ):
13
+ from sphinx .testing .path import path
14
+
15
+ return path (__file__ ).parent .abspath () / 'roots'
16
+
10
17
return Path (__file__ ).resolve ().parent / 'roots'
Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ def check_localization(outdir):
31
31
confoverrides = {'applehelp_bundle_id' : 'org.sphinx-doc.Sphinx.help' ,
32
32
'applehelp_disable_external_tools' : True })
33
33
def test_applehelp_output (app , status , warning ):
34
- (app .srcdir / 'en.lproj' ).mkdir (parents = True , exist_ok = True )
35
- (app .srcdir / 'en.lproj' / 'localized.txt' ).touch ()
34
+ LPROJ_DIR = Path (app .srcdir / 'en.lproj' )
35
+ LPROJ_DIR .mkdir (parents = True , exist_ok = True )
36
+ LPROJ_DIR .joinpath ('localized.txt' ).touch ()
36
37
app .builder .build_all ()
37
38
38
39
# Have to use bundle_path, not outdir, because we alter the latter
You can’t perform that action at this time.
0 commit comments