File tree 3 files changed +15
-10
lines changed
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -31,14 +31,20 @@ jobs:
31
31
32
32
steps :
33
33
- uses : actions/checkout@v3
34
- - name : Setup Python ${{ matrix.python }}
34
+ - name : Set up Python ${{ matrix.python }}
35
35
uses : actions/setup-python@v4
36
+ if : " !endsWith(matrix.python, '-dev')"
37
+ with :
38
+ python-version : ${{ matrix.python }}
39
+ - name : Set up Python ${{ matrix.python }} (deadsnakes)
40
+ uses : deadsnakes/action@v2.1.1
41
+ if : " endsWith(matrix.python, '-dev')"
36
42
with :
37
43
python-version : ${{ matrix.python }}
38
44
- name : Install dependencies
39
45
run : |
40
46
python -m pip install --upgrade pip
41
- python -m pip install --upgrade pytest
47
+ python -m pip install .[test]
42
48
python -m pip install "Sphinx @ git+https://github.com/sphinx-doc/sphinx"
43
49
44
50
- name : Test with pytest
Original file line number Diff line number Diff line change 6
6
:license: BSD, see LICENSE for details.
7
7
"""
8
8
9
- import pytest
9
+ from pathlib import Path
10
10
11
- from sphinx . testing . path import path
11
+ import pytest
12
12
13
13
pytest_plugins = 'sphinx.testing.fixtures'
14
14
15
15
16
16
@pytest .fixture (scope = 'session' )
17
17
def rootdir ():
18
- return path (__file__ ).parent . abspath () / 'roots'
18
+ return Path (__file__ ).resolve (). parent / 'roots'
Original file line number Diff line number Diff line change 8
8
:license: BSD, see LICENSE for details.
9
9
"""
10
10
11
+ from pathlib import Path
11
12
import plistlib
12
13
13
14
import pytest
14
15
15
- from sphinx .testing .path import path
16
-
17
16
18
17
def check_structure (outdir ):
19
18
contentsdir = outdir / 'Contents'
@@ -40,13 +39,13 @@ def check_localization(outdir):
40
39
confoverrides = {'applehelp_bundle_id' : 'org.sphinx-doc.Sphinx.help' ,
41
40
'applehelp_disable_external_tools' : True })
42
41
def test_applehelp_output (app , status , warning ):
43
- (app .srcdir / 'en.lproj' ).makedirs ( )
44
- (app .srcdir / 'en.lproj' / 'localized.txt' ).write_text ( '' )
42
+ (app .srcdir / 'en.lproj' ).mkdir ( parents = True , exist_ok = True )
43
+ (app .srcdir / 'en.lproj' / 'localized.txt' ).touch ( )
45
44
app .builder .build_all ()
46
45
47
46
# Have to use bundle_path, not outdir, because we alter the latter
48
47
# to point to the lproj directory so that the HTML arrives in the
49
48
# correct location.
50
- bundle_path = path (app .builder .bundle_path )
49
+ bundle_path = Path (app .builder .bundle_path )
51
50
check_structure (bundle_path )
52
51
check_localization (bundle_path )
You can’t perform that action at this time.
0 commit comments