Skip to content

Commit

Permalink
Fix sphinx.testing deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
npilon authored and timkpaine committed Sep 12, 2024
1 parent c649b32 commit f48589c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: docs/requirements.txt
cache-dependency-path: setup.py

- name: Install dependencies
run: |
python -m pip install -r docs/requirements.txt
python -m pip install -U pytest
python -m pip install -e .
python -m pip install -e .[test]
- name: Test
run: |
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Sphinx<7
Sphinx
myst-parser>=1.0.0
11 changes: 9 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
from pathlib import Path

import pytest
from sphinx.testing.path import path
import sphinx
from packaging.version import Version


pytest_plugins = 'sphinx.testing.fixtures'


@pytest.fixture(scope='session')
def rootdir():
return path(__file__).parent.abspath() / 'roots'
if Version(sphinx.__version__) < Version('7.0.0'):
from sphinx.testing.path import path
return path(__file__).parent.abspath() / 'roots'
return Path(__file__).parent.absolute() / 'roots'

0 comments on commit f48589c

Please sign in to comment.