File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files chan
8000
ged +12
-5
lines changed Original file line number Diff line number Diff line change 25
25
- " 3.9"
26
26
- " 3.10"
27
27
- " 3.11"
28
- # - "3.12-dev"
28
+ - " 3.12"
29
+ - " 3.13-dev"
29
30
sphinx :
30
31
- " 4" # jQuery included
31
32
- " 5" # jQuery deprecated
Original file line number Diff line number Diff line change 4
4
5
5
import pytest
6
6
import sphinx
7
- from sphinx .testing .path import path
8
7
from sphinx .testing .util import SphinxTestApp
9
8
10
9
from sphinxcontrib .jquery import _FILES , _ROOT_DIR # NoQA
11
10
11
+ if sphinx .version_info [:2 ] >= (7 , 2 ):
12
+ test_path = Path
13
+ else :
14
+ from sphinx .testing .path import path as test_path
15
+
12
16
13
17
def run_blank_app (srcdir , ** kwargs ):
14
18
Path (srcdir , "conf.py" ).write_text ("" , encoding = "ascii" )
@@ -24,11 +28,13 @@ def run_blank_app(srcdir, **kwargs):
24
28
25
29
26
30
@pytest .fixture (scope = "function" )
27
- def blank_app (tmpdir , monkeypatch ):
31
+ def blank_app (tmp_path , monkeypatch ):
28
32
def inner (** kwargs ):
29
- return run_blank_app (path ( tmpdir ), ** kwargs )
33
+ return run_blank_app (test_path ( tmp_path ), ** kwargs )
30
34
31
- monkeypatch .setattr ("sphinx.application.abspath" , lambda x : x )
35
+ # Sphinx>=7.2 doesn't have abspath
36
+ if sphinx .version_info [:2 ] < (7 , 2 ):
37
+ monkeypatch .setattr ("sphinx.application.abspath" , lambda x : x )
32
38
yield inner
33
39
34
40
You can’t perform that action at this time.
0 commit comments