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:
parent
a4fd97b55a
commit
6321c3f11b
2 changed files with 20 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue