-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix sphinx.testing deprecation warning
- Loading branch information
Showing
3 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Sphinx<7 | ||
Sphinx | ||
myst-parser>=1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |