8000 Enable testing with Sphinx 7.2 (#28) · sphinx-contrib/jquery@80d1d39 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit 80d1d39

Browse files
befelememitya57AA-Turner
authored
Enable testing with Sphinx 7.2 (#28)
Co-authored-by: Dmitry Shachnev <mitya57@gmail.com> Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
1 parent ed84c0d commit 80d1d39

File tree

2 files changed

+12
-5
lines changed

2 files chan 8000 ged

+12
-5
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ jobs:
2525
- "3.9"
2626
- "3.10"
2727
- "3.11"
28-
# - "3.12-dev"
28+
- "3.12"
29+
- "3.13-dev"
2930
sphinx:
3031
- "4" # jQuery included
3132
- "5" # jQuery deprecated

tests/test_jquery_installed.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44

55
import pytest
66
import sphinx
7-
from sphinx.testing.path import path
87
from sphinx.testing.util import SphinxTestApp
98

109
from sphinxcontrib.jquery import _FILES, _ROOT_DIR # NoQA
1110

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+
1216

1317
def run_blank_app(srcdir, **kwargs):
1418
Path(srcdir, "conf.py").write_text("", encoding="ascii")
@@ -24,11 +28,13 @@ def run_blank_app(srcdir, **kwargs):
2428

2529

2630
@pytest.fixture(scope="function")
27-
def blank_app(tmpdir, monkeypatch):
31+
def blank_app(tmp_path, monkeypatch):
2832
def inner(**kwargs):
29-
return run_blank_app(path(tmpdir), **kwargs)
33+
return run_blank_app(test_path(tmp_path), **kwargs)
3034

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)
3238
yield inner
3339

3440

0 commit comments

Comments
 (0)
0