Skip to content

Commit 64dbbad

Browse files
author
Michael McNeil Forbes
committed
TST,BUG,CI: Resolves issue #17. Updated tests
--HG-- branch : default/0.4.3
1 parent 34971f3 commit 64dbbad

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
9+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1010
fail-fast: false
1111
steps:
1212
- uses: actions/checkout@v3

noxfile.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ def _has_venv(session):
77

88

99
python_versions = ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
10-
sphinx_versions = {_p: ["4.5.0", "5.3.0", "6.1.3", "7.2.6", "8.2.3"] #, "9.0.4"]
11-
for _p in python_versions}
12-
python_versions = ["3.13"]
13-
sphinx_versions = {_p: ["9.0.4"]
10+
sphinx_versions = {_p: ["4.5.0", "5.3.0", "6.1.3", "7.2.6", "8.2.3", "9.0.4"]
1411
for _p in python_versions}
1512

1613
# These are in the full matrix, but excluded by the constraints in pyproject.toml. Not

tests/test_autointerface.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,24 @@ def test_sphinx_build(app, status, warning):
3737
_E = _E.strip()
3838
if version.parse(sphinx.__version__) < version.parse("7.2.0"):
3939
_E = _E.replace("Link", "Permalink")
40+
4041
if version.parse(sphinx.__version__) < version.parse("8.2.0"):
4142
# Note `(.*?)` is a non-greedy match.
4243
p = re.compile(r'<span class="k"><span class="pre">(.*?)</span></span>')
4344
r = r'<span class="pre">\1</span>'
44-
if r'<span class="k">' in _E:
45+
if p.search(_E):
4546
_E = p.sub(r, _E)
46-
assert _E in html
47-
48-
# Some code for debugging when needed
49-
# except:
47+
48+
if version.parse(sphinx.__version__) >= version.parse("9.0.0"):
49+
p = re.compile(r'<em class="property">(.*?)</em>')
50+
r = r'<span class="property">\1</span>'
51+
if p.search(_E):
52+
_E = p.sub(r, _E)
53+
54+
try:
55+
assert _E in html
56+
except:
57+
raise
5058
# with open('_lhs.html', 'w') as f:
5159
# f.write(_E)
5260
# with open('_rhs.html', 'w') as f:

0 commit comments

Comments
 (0)