Skip to content

Commit 4ba0bbc

Browse files
committed
Restore support in tests for Sphinx<7.2
1 parent 5c00ac1 commit 4ba0bbc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: tests/conftest.py

+7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
import pytest
44

5+
import sphinx
6+
57
pytest_plugins = 'sphinx.testing.fixtures'
68

79

810
@pytest.fixture(scope='session')
911
def rootdir():
12+
if sphinx.version_info[:2] < (7, 2):
13+
from sphinx.testing.path import path
14+
15+
return path(__file__).parent.abspath() / 'roots'
16+
1017
return Path(__file__).resolve().parent / 'roots'

0 commit comments

Comments
 (0)