Skip to content

Commit e1dbe1b

Browse files
Add testing for python 3.11 and 3.12 (#182)
* Add testing for python 3.11 and 3.12 * Allow testing against python 3.12 pre-release * Upgrade python setup action version * Remove depreciated sphinx_testing dependency --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a3f94ca commit e1dbe1b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
python-version: ["3.9", "3.10"]
23+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2424

2525
steps:
2626
- uses: actions/checkout@v2
2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v1
28+
uses: actions/setup-python@v3
2929
with:
3030
python-version: ${{ matrix.python-version }}
31+
allow-prereleases: true
3132
- name: Install dependencies
3233
run: |
3334
python -m pip install --upgrade pip

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ def get_version():
3333
"pytest-cov",
3434
"pytest-regressions",
3535
"pygments",
36-
"sphinx_testing",
3736
"bs4",
3837
"rinohtype",
3938
],

tests/conftest.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pathlib import Path
44
from bs4 import BeautifulSoup
55
import sphinx
6-
from sphinx.testing.path import path
76

87
from sphinx_tabs.tabs import FILES
98

@@ -19,7 +18,7 @@ def pytest_configure(config):
1918
@pytest.fixture(scope="session")
2019
def rootdir():
2120
"""Pytest uses this to find test documents."""
22-
return path(__file__).parent.abspath() / "roots"
21+
return Path(__file__).parent.absolute() / "roots"
2322

2423

2524
@pytest.fixture(autouse=True)
@@ -117,7 +116,7 @@ def read(app, docname="index", resolve=False, regress=False, replace=None):
117116
extension = ".xml"
118117

119118
# convert absolute filenames
120-
for node in doctree.traverse(lambda n: "source" in n):
119+
for node in doctree.findall(lambda n: "source" in n):
121120
node["source"] = Path(node["source"]).name
122121

123122
if regress:

0 commit comments

Comments
 (0)