Skip to content

Commit

Permalink
Add testing for python 3.11 and 3.12 (#182)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
foster999 and pre-commit-ci[bot] authored Oct 22, 2023
1 parent a3f94ca commit e1dbe1b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def get_version():
"pytest-cov",
"pytest-regressions",
"pygments",
"sphinx_testing",
"bs4",
"rinohtype",
],
Expand Down
5 changes: 2 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path
from bs4 import BeautifulSoup
import sphinx
from sphinx.testing.path import path

from sphinx_tabs.tabs import FILES

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


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

# convert absolute filenames
for node in doctree.traverse(lambda n: "source" in n):
for node in doctree.findall(lambda n: "source" in n):
node["source"] = Path(node["source"]).name

if regress:
Expand Down

0 comments on commit e1dbe1b

Please sign in to comment.