Skip to content

Commit aadc7e9

Browse files
committed
A failing test for issue #109.
1 parent c919c96 commit aadc7e9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bpython/test/test_inspection.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,15 @@ def spam():
2929
self.assertFalse(inspection.is_callable(Noncallable()))
3030
self.assertFalse(inspection.is_callable(OldNoncallable()))
3131
self.assertFalse(inspection.is_callable(None))
32+
33+
def test_parsekeywordpairs(self):
34+
def fails(spam=['-a', '-b']):
35+
pass
36+
37+
default_arg_repr = "['-a', '-b']"
38+
self.assertEqual(str(['-a', '-b']), default_arg_repr,
39+
'This test is broken (repr does not match), fix me.')
40+
41+
argspec = inspection.getargspec('fails', fails)
42+
defaults = argspec[1][3]
43+
self.assertEqual(str(defaults[0]), default_arg_repr)

0 commit comments

Comments
 (0)