diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2019-06-01 17:08:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-01 17:08:04 (GMT) |
commit | cd74e66a8c420be675fd2fbf3fe708ac02ee9f21 (patch) | |
tree | 12f985512507967c339019c4c21b4a613cd6c61b /Lib/test/test_positional_only_arg.py | |
parent | 059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d (diff) | |
download | cpython-cd74e66a8c420be675fd2fbf3fe708ac02ee9f21.zip cpython-cd74e66a8c420be675fd2fbf3fe708ac02ee9f21.tar.gz cpython-cd74e66a8c420be675fd2fbf3fe708ac02ee9f21.tar.bz2 |
bpo-37122: Make co->co_argcount represent the total number of positonal arguments in the code object (GH-13726)
Diffstat (limited to 'Lib/test/test_positional_only_arg.py')
-rw-r--r-- | Lib/test/test_positional_only_arg.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_positional_only_arg.py b/Lib/test/test_positional_only_arg.py index 0aaad84..59b0b8f 100644 --- a/Lib/test/test_positional_only_arg.py +++ b/Lib/test/test_positional_only_arg.py @@ -100,14 +100,14 @@ class PositionalOnlyTestCase(unittest.TestCase): def f(a, b, c, /, d, e=1, *, f, g=2): pass - self.assertEqual(2, f.__code__.co_argcount) # 2 "standard args" + self.assertEqual(5, f.__code__.co_argcount) # 3 posonly + 2 "standard args" self.assertEqual(3, f.__code__.co_posonlyargcount) self.assertEqual((1,), f.__defaults__) def f(a, b, c=1, /, d=2, e=3, *, f, g=4): pass - self.assertEqual(2, f.__code__.co_argcount) # 2 "standard args" + self.assertEqual(5, f.__code__.co_argcount) # 3 posonly + 2 "standard args" self.assertEqual(3, f.__code__.co_posonlyargcount) self.assertEqual((1, 2, 3), f.__defaults__) |