Skip to content

Commit

Permalink
Fix for older sphinx.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmtroffaes committed Aug 22, 2023
1 parent 2c603f9 commit 68eea61
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
from pathlib import Path

import pytest
import sphinx

if sphinx.version_info < (7,):
from sphinx.testing.path import path
_rootdir = path(__file__).parent.abspath() / 'roots'
else:
from pathlib import Path
_rootdir = Path(__file__).parent.resolve() / 'roots'

pytest_plugins = 'sphinx.testing.fixtures'
collect_ignore = ['roots']


@pytest.fixture(scope='session')
def rootdir() -> Path:
return Path(__file__).parent.resolve() / 'roots'
return _rootdir

0 comments on commit 68eea61

Please sign in to comment.