fix(test): retrofit deprecations

pathlib support and sphinx.testing.path deprecation in Sphinx ver. 9  was
announced in Sphinx ver. 6 and enabled in Sphinx ver. 7, hence there are three
different environment states to support in regards to paths in Sphinx testing
environments.
This commit is contained in:
Tiara Rodney 2025-06-28 00:25:46 +02:00
parent a4fd97b55a
commit 6321c3f11b
No known key found for this signature in database
GPG key ID: 5F43FAB4FBE5B5EB
2 changed files with 20 additions and 3 deletions

View file

@ -1,3 +1,4 @@
from pathlib import Path
import pytest
@ -26,6 +27,6 @@ def test_mock_sphinx_testapp(mock_sphinx_testapp, mock_sphinx_testsrc_dir):
app = mock_sphinx_testapp(srcdir=srcdir)
assert app.builder is not None
assert app.srcdir.samefile(srcdir) is False # Should be copied to internal src
assert Path(app.srcdir).samefile(srcdir) is False # Should be copied to internal src
app.build(force_all=True)