Python3.11: Do not use inspect.ArgSpec
Python3.11 will remove inspect.ArgSpec and cause test failures on the CI. Closes-Bug: #1982851 Change-Id: I4bc4ab6cfeb3d15072145aa093d3407f35ddf41e
This commit is contained in:
parent
cec2b8e8f0
commit
2b1202938a
@ -757,11 +757,15 @@ class TestMethodSpec(test.TestCase):
|
||||
self._test_method3 = test_method3
|
||||
|
||||
def test_method_spec_compat(self):
|
||||
self.assertEqual(inspect.ArgSpec(args=['a', 'b', 'kw1'], varargs=None,
|
||||
keywords='kwargs', defaults=(123,)),
|
||||
self.assertEqual(fixture.CompatArgSpec(args=['a', 'b', 'kw1'],
|
||||
varargs=None,
|
||||
keywords='kwargs',
|
||||
defaults=(123,)),
|
||||
fixture.get_method_spec(self._test_method1))
|
||||
self.assertEqual(inspect.ArgSpec(args=['a', 'b'], varargs='args',
|
||||
keywords=None, defaults=None),
|
||||
self.assertEqual(fixture.CompatArgSpec(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))
|
||||
|
Loading…
Reference in New Issue
Block a user