mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 23:23:00 -04:00
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
diff --git a/os_api_ref/tests/base.py b/os_api_ref/tests/base.py
|
|
index 6e5e0dc..f5c2c1d 100644
|
|
--- a/os_api_ref/tests/base.py
|
|
+++ b/os_api_ref/tests/base.py
|
|
@@ -16,10 +16,11 @@
|
|
import os
|
|
|
|
import fixtures
|
|
+import shutil
|
|
import tempfile
|
|
import testtools
|
|
|
|
-from sphinx.testing.path import path
|
|
+from pathlib import Path
|
|
from sphinx.testing.util import SphinxTestApp
|
|
|
|
|
|
@@ -33,17 +34,16 @@ _TRUE_VALUES = ('True', 'true', '1', 'yes')
|
|
class with_app:
|
|
def __init__(self, **kwargs):
|
|
if 'srcdir' in kwargs:
|
|
- self.srcdir = path(kwargs['srcdir'])
|
|
+ self.srcdir = Path(kwargs['srcdir'])
|
|
self.sphinx_app_args = kwargs
|
|
|
|
def __call__(self, f):
|
|
def newf(*args, **kwargs):
|
|
with tempfile.TemporaryDirectory() as tmpdirname:
|
|
- tmpdir = path(tmpdirname)
|
|
- tmproot = tmpdir / self.srcdir.basename()
|
|
- self.srcdir.copytree(tmproot)
|
|
+ tmpdir = Path(tmpdirname)
|
|
+ tmproot = tmpdir / self.srcdir.name
|
|
+ shutil.copytree(self.srcdir, tmproot)
|
|
self.sphinx_app_args['srcdir'] = tmproot
|
|
- self.builddir = tmproot.joinpath('_build')
|
|
|
|
app = SphinxTestApp(freshenv=True, **self.sphinx_app_args)
|
|
|