Skip to content

Commit 24e25bd

Browse files
committed
handle older sphinx
1 parent 07453d6 commit 24e25bd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_execute.py

+7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
from sphinx.addnodes import download_reference
1414
from sphinx.errors import ExtensionError
1515
from sphinx.testing.util import SphinxTestApp, assert_node
16+
try:
17+
from sphinx.testing.util import path
18+
except ImportError:
19+
path = None
20+
1621

1722
from jupyter_sphinx.ast import (
1823
JupyterCellNode,
@@ -47,6 +52,8 @@ def doctree(
4752
(src_dir / "index.rst").write_text(source, encoding="utf8")
4853

4954
warnings = StringIO()
55+
if path is not None:
56+
src_dir = path(src_dir.as_posix())
5057
app = SphinxTestApp(
5158
srcdir=src_dir,
5259
status=StringIO(),

0 commit comments

Comments
 (0)