mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-14 17:43:11 -04:00
dev-python/os-api-ref: add 3.0.0, drop 2.3.0
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py
|
||||
index 8281442..c338c51 100644
|
||||
--- a/os_api_ref/tests/test_microversions.py
|
||||
+++ b/os_api_ref/tests/test_microversions.py
|
||||
@@ -44,11 +44,11 @@ class TestMicroversions(base.TestCase):
|
||||
def test_rest_method(self):
|
||||
"""Test that min / max mv css class attributes are set"""
|
||||
content = self.soup.find_all(class_='rp_min_ver_2_17')
|
||||
- self.assertRegexpMatches(
|
||||
+ self.assertRegex(
|
||||
str(content[0]),
|
||||
'^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
|
||||
content = self.soup.find_all(class_='rp_max_ver_2_19')
|
||||
- self.assertRegexpMatches(
|
||||
+ self.assertRegex(
|
||||
str(content[0]),
|
||||
'^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user