Skip to content

Commit 9bbb25d

Browse files
committed
Add another tests for function signatures
1 parent 231adb1 commit 9bbb25d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bpython/test/test_inspection.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ def spam(eggs=23, foobar="yay"):
7777
self.assertEqual(repr(defaults[0]), "23")
7878
self.assertEqual(repr(defaults[1]), "'yay'")
7979

80+
def test_pasekeywordpairs_annotation(self):
81+
def spam(eggs: str = "foo, bar"):
82+
pass
83+
84+
defaults = inspection.getfuncprops("spam", spam).argspec.defaults
85+
self.assertEqual(repr(defaults[0]), "'foo, bar'")
86+
8087
def test_get_encoding_ascii(self):
8188
self.assertEqual(inspection.get_encoding(encoding_ascii), "ascii")
8289
self.assertEqual(inspection.get_encoding(encoding_ascii.foo), "ascii")

0 commit comments

Comments
 (0)