summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2019-05-31 11:07:56 (GMT)
committerGitHub <noreply@github.com>2019-05-31 11:07:56 (GMT)
commit3a46d5c293d39995dc5218bf46a7d92b16fb2a15 (patch)
tree351bf512e6ec36ea7df878c48740114c71b2ba33 /Lib
parentc7f803b08ed5211701c75f98ba9ada85d45ac155 (diff)
downloadcpython-3a46d5c293d39995dc5218bf46a7d92b16fb2a15.zip
cpython-3a46d5c293d39995dc5218bf46a7d92b16fb2a15.tar.gz
cpython-3a46d5c293d39995dc5218bf46a7d92b16fb2a15.tar.bz2
bpo-37108: Support super with methods that use positional-only arguments (GH-13695)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_positional_only_arg.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_positional_only_arg.py b/Lib/test/test_positional_only_arg.py
index d4d259e..0aaad84 100644
--- a/Lib/test/test_positional_only_arg.py
+++ b/Lib/test/test_positional_only_arg.py
@@ -398,6 +398,20 @@ class PositionalOnlyTestCase(unittest.TestCase):
gen = f()
self.assertEqual(next(gen), (1, 2))
+ def test_super(self):
+
+ sentinel = object()
+
+ class A:
+ def method(self):
+ return sentinel
+
+ class C(A):
+ def method(self, /):
+ return super().method()
+
+ self.assertEqual(C().method(), sentinel)
+
if __name__ == "__main__":
unittest.main()