mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-06 05:47:13 +02:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 2dc8044780d140d942984f47960d0712cdd3b8ba Mon Sep 17 00:00:00 2001
|
|
From: Gareth Rees <grees@undo.io>
|
|
Date: Sun, 31 Mar 2024 17:17:58 +0100
|
|
Subject: [PATCH] Update `test_renderer` so that tests pass with Sphinx 7.2.
|
|
|
|
Sphinx was updated in in pull request sphinx-doc/sphinx#11526 (July
|
|
2023) so that importing `sphinx.testing.path` no longer causes Sphinx
|
|
application paths to belong to the class `sphinx.testing.path.path`,
|
|
which has a `makedirs` method.
|
|
|
|
Instead, Sphinx application paths are now ordinary `Path` objects
|
|
which lack this method, so we use `os.makedirs` instead. This is
|
|
backwards compatible as `sphinx.testing.path.path` objects are
|
|
pathlike and so accepted by `os.makedirs`.
|
|
|
|
Fixes issue #975.
|
|
---
|
|
tests/test_renderer.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/tests/test_renderer.py b/tests/test_renderer.py
|
|
index a858c65d..0fd044a5 100644
|
|
--- a/tests/test_renderer.py
|
|
+++ b/tests/test_renderer.py
|
|
@@ -35,7 +35,7 @@ def app(test_params, app_params, make_app, shared_result):
|
|
"""
|
|
args, kwargs = app_params
|
|
assert "srcdir" in kwargs
|
|
- kwargs["srcdir"].makedirs(exist_ok=True)
|
|
+ os.makedirs(kwargs["srcdir"], exist_ok=True)
|
|
(kwargs["srcdir"] / "conf.py").write_text("")
|
|
app_ = make_app(*args, **kwargs)
|
|
yield app_
|