Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenStack
oslo
python-oslo.versionedobjects
Commits
a85275fb
Commit
a85275fb
authored
Aug 10, 2021
by
Zuul
Committed by
Gerrit Code Review
Aug 10, 2021
Browse files
Merge "Replace deprecated inspect.getargspec"
parents
7e1f0082
07fd2f2c
Changes
2
Hide whitespace changes
Inline
Side-by-side
oslo_versionedobjects/test.py
View file @
a85275fb
...
...
@@ -178,8 +178,8 @@ class TestCase(testtools.TestCase):
baseclass
)
for
name
in
sorted
(
implmethods
.
keys
()):
baseargs
=
inspect
.
getargspec
(
basemethods
[
name
])
implargs
=
inspect
.
getargspec
(
implmethods
[
name
])
baseargs
=
inspect
.
get
full
argspec
(
basemethods
[
name
])
implargs
=
inspect
.
get
full
argspec
(
implmethods
[
name
])
self
.
assertEqual
(
baseargs
,
implargs
,
"%s args don't match base class %s"
%
...
...
oslo_versionedobjects/tests/test_fixture.py
View file @
a85275fb
...
...
@@ -757,9 +757,11 @@ class TestMethodSpec(test.TestCase):
self
.
_test_method3
=
test_method3
def
test_method_spec_compat
(
self
):
self
.
assertEqual
(
inspect
.
getargspec
(
self
.
_test_method1
),
self
.
assertEqual
(
inspect
.
ArgSpec
(
args
=
[
'a'
,
'b'
,
'kw1'
],
varargs
=
None
,
keywords
=
'kwargs'
,
defaults
=
(
123
,)),
fixture
.
get_method_spec
(
self
.
_test_method1
))
self
.
assertEqual
(
inspect
.
getargspec
(
self
.
_test_method2
),
self
.
assertEqual
(
inspect
.
ArgSpec
(
args
=
[
'a'
,
'b'
],
varargs
=
'args'
,
keywords
=
None
,
defaults
=
None
),
fixture
.
get_method_spec
(
self
.
_test_method2
))
self
.
assertEqual
(
inspect
.
getfullargspec
(
self
.
_test_method3
),
fixture
.
get_method_spec
(
self
.
_test_method3
))
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment