summaryrefslogtreecommitdiff
path: root/nova/test.py
diff options
context:
space:
mode:
authorlikui <likui@yovole.com>2021-05-10 18:10:56 +0800
committerlikui <likui@yovole.com>2021-05-12 10:50:52 +0800
commit150b9182512fa0a4f157586e040a7f67c1851005 (patch)
treed39766c26fb64fd1eb71716fe5e360ae353d874c /nova/test.py
parent7953c0197d1a4466cb5b78070d47626c92f9db6e (diff)
downloadnova-150b9182512fa0a4f157586e040a7f67c1851005.tar.gz
Replace getargspec with getfullargspec
inspect.getargspec() is deprecated since py3 [1] https://docs.python.org/3/library/inspect.html#inspect.getargspec Change-Id: I6fbdf942dd192351e135430997c15ea92e7fb8af
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/test.py b/nova/test.py
index 1bcffd44ba..baa19589cf 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -635,8 +635,8 @@ class TestCase(base.BaseTestCase):
for name in sorted(implmethods.keys()):
# NOTE(stephenfin): We ignore type annotations
- baseargs = utils.getargspec(basemethods[name])[:-1]
- implargs = utils.getargspec(implmethods[name])[:-1]
+ baseargs = inspect.getfullargspec(basemethods[name])[:-1]
+ implargs = inspect.getfullargspec(implmethods[name])[:-1]
self.assertEqual(baseargs, implargs,
"%s args don't match base class %s" %
@@ -709,7 +709,7 @@ class SubclassSignatureTestCase(testtools.TestCase, metaclass=abc.ABCMeta):
# instead.
method = getattr(method, '__wrapped__')
- argspecs[name] = utils.getargspec(method)
+ argspecs[name] = inspect.getfullargspec(method)
return argspecs