summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_types.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index cde9dad..8556ca3 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -597,6 +597,12 @@ class TypesTests(unittest.TestCase):
self.assertIsInstance(object.__lt__, types.WrapperDescriptorType)
self.assertIsInstance(int.__lt__, types.WrapperDescriptorType)
+ def test_dunder_get_signature(self):
+ sig = inspect.signature(object.__init__.__get__)
+ self.assertEqual(list(sig.parameters), ["instance", "owner"])
+ # gh-93021: Second parameter is optional
+ self.assertIs(sig.parameters["owner"].default, None)
+
def test_method_wrapper_types(self):
self.assertIsInstance(object().__init__, types.MethodWrapperType)
self.assertIsInstance(object().__str__, types.MethodWrapperType)