Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit c000817

Browse files
stsewdhumitos
andauthored
Fix tests (#289)
* Fix tests The latest version of Sphinx doesn't install some packages that are required for the tests by default. * Fix versions and test with Python 3.12 * More test fixing * pytest skipif * import sys --------- Co-authored-by: Manuel Kaufmann <[email protected]>
1 parent a2d28d5 commit c000817

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

.circleci/config.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ commands:
88
type: string
99
sphinx-version:
1010
type: string
11-
default: "50,53,60,62,70,latest"
11+
default: "50,53,60,62,70,73,latest"
1212
steps:
1313
- checkout
1414
# Tox >=4 fails with `ValueError: py310-sphinx{18`
@@ -22,6 +22,8 @@ jobs:
2222
steps:
2323
- run-tox:
2424
version: py38
25+
# Sphinx >=7.2 requires Python 3.9+
26+
sphinx-version: "50,53,60,62,70"
2527

2628
py39:
2729
docker:
@@ -37,11 +39,18 @@ jobs:
3739
- run-tox:
3840
version: py310
3941

42+
py312:
43+
docker:
44+
- image: 'cimg/python:3.12'
45+
steps:
46+
- run-tox:
47+
version: py312
48+
4049
workflows:
4150
version: 2
4251
test:
4352
jobs:
4453
- py38
4554
- py39
4655
- py310
47-
56+
- py312

tests/test_htmltag.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import re
2+
import sys
23
import pytest
34
import sphinx
45
import textwrap
@@ -156,6 +157,7 @@ def test_python_domain_intersphinx(app, status, warning):
156157
assert chunk in content
157158

158159

160+
@pytest.mark.skipif(sys.version_info >= (3, 12), reason="sphinxcontrib.bibtex is not compatible with Python 3.12")
159161
@pytest.mark.sphinx(
160162
srcdir=bibtexdomainsrcdir,
161163
confoverrides={

tox.ini

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ isolated_build = True
44

55
envlist =
66
docs
7-
py{38,39,310}-sphinx{50,53,60,62,70,latest}
7+
py{38,39,310,312}-sphinx{50,53,60,62,70,73,latest}
88

99
[testenv]
1010
deps =
@@ -16,8 +16,9 @@ deps =
1616
sphinx53: sphinx~=5.3.0
1717
sphinx60: sphinx~=6.0.0
1818
sphinx62: sphinx~=6.2.0
19-
sphinx73: sphinx~=7.0.0
20-
sphinxlatest: sphinx
19+
sphinx70: sphinx~=7.0.0
20+
sphinx73: sphinx[test]~=7.3.0
21+
sphinxlatest: sphinx[test]
2122

2223
commands = pytest {posargs}
2324

0 commit comments

Comments
 (0)