Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell committed Nov 6, 2023
1 parent b77ece2 commit 1c43107
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
# This list can contain more versions as used by the github workflows to support
# custom local tests

PYTHON_VERSIONS = ["3.8", "3.10"]
SPHINX_VERSIONS = ["5.0", "6.0", "7.0"]
PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"]
SPHINX_VERSIONS = ["5.0", "6.0", "7.2"]


@session(python=PYTHON_VERSIONS)
Expand Down
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import pytest
from docutils.nodes import document
from sphinx import version_info
from sphinx.application import Sphinx
from sphinx.testing.path import path
from syrupy.extensions.single_file import SingleFileSnapshotExtension, WriteMode
Expand Down Expand Up @@ -230,6 +231,10 @@ def test_app(make_app, sphinx_test_tempdir, request):
# copy test srcdir to test temporary directory sphinx_test_tempdir
srcdir = builder_params.get("srcdir")
src_dir = copy_srcdir_to_tmpdir(srcdir, sphinx_test_tempdir)
parent_path = Path(str(src_dir.parent.abspath()))

if version_info >= (7, 2):
src_dir = Path(str(src_dir))

# return sphinx.testing fixture make_app and new srcdir which is in sphinx_test_tempdir
app: Sphinx = make_app(
Expand All @@ -256,7 +261,7 @@ def test_app(make_app, sphinx_test_tempdir, request):
yield app

# Clean up the srcdir of each Sphinx app after the test function has executed
shutil.rmtree(src_dir.parent.abspath(), ignore_errors=True)
shutil.rmtree(parent_path, ignore_errors=True)


class DoctreeSnapshotExtension(SingleFileSnapshotExtension):
Expand Down

0 comments on commit 1c43107

Please sign in to comment.