diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-04-30 01:01:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-30 01:01:14 (GMT) |
commit | d5d2b4546939b98244708e5bb0cfccd55b99d244 (patch) | |
tree | 2a98e93bcad785c97f88154d275a4662afa40f8c /Lib/unittest | |
parent | 81c5a905951aaf46f292eb459c32649c0b74ef61 (diff) | |
download | cpython-d5d2b4546939b98244708e5bb0cfccd55b99d244.zip cpython-d5d2b4546939b98244708e5bb0cfccd55b99d244.tar.gz cpython-d5d2b4546939b98244708e5bb0cfccd55b99d244.tar.bz2 |
bpo-36751: Deprecate getfullargspec and report positional-only args as regular args (GH-13016)
* bpo-36751: Deprecate getfullargspec and report positional-only args as regular args
* Use inspect.signature in testhelpers
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/test/testmock/testhelpers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/test/testmock/testhelpers.py b/Lib/unittest/test/testmock/testhelpers.py index 0d03108..e321976 100644 --- a/Lib/unittest/test/testmock/testhelpers.py +++ b/Lib/unittest/test/testmock/testhelpers.py @@ -920,7 +920,7 @@ class SpecSignatureTest(unittest.TestCase): mock(1, 2) mock(x=1, y=2) - self.assertEqual(inspect.getfullargspec(mock), inspect.getfullargspec(myfunc)) + self.assertEqual(inspect.signature(mock), inspect.signature(myfunc)) self.assertEqual(mock.mock_calls, [call(1, 2), call(x=1, y=2)]) self.assertRaises(TypeError, mock, 1) @@ -934,7 +934,7 @@ class SpecSignatureTest(unittest.TestCase): mock(1, 2, c=3) mock(1, c=3) - self.assertEqual(inspect.getfullargspec(mock), inspect.getfullargspec(foo)) + self.assertEqual(inspect.signature(mock), inspect.signature(foo)) self.assertEqual(mock.mock_calls, [call(1, 2, c=3), call(1, c=3)]) self.assertRaises(TypeError, mock, 1) self.assertRaises(TypeError, mock, 1, 2, 3, c=4) |