@@ -62,22 +62,22 @@ def fails(spam=['-a', '-b']):
62
62
self .assertEqual (str (['-a' , '-b' ]), default_arg_repr ,
63
63
'This test is broken (repr does not match), fix me.' )
64
64
65
- argspec = inspection .getargspec ('fails' , fails )
66
- defaults = argspec [ 1 ][ 3 ]
65
+ argspec = inspection .getfuncprops ('fails' , fails )
66
+ defaults = argspec . argspec . defaults
67
67
self .assertEqual (str (defaults [0 ]), default_arg_repr )
68
68
69
69
def test_pasekeywordpairs_string (self ):
70
70
def spam (eggs = "foo, bar" ):
71
71
pass
72
72
73
- defaults = inspection .getargspec ("spam" , spam )[ 1 ][ 3 ]
73
+ defaults = inspection .getfuncprops ("spam" , spam ). argspec . defaults
74
74
self .assertEqual (repr (defaults [0 ]), "'foo, bar'" )
75
75
76
76
def test_parsekeywordpairs_multiple_keywords (self ):
77
77
def spam (eggs = 23 , foobar = "yay" ):
78
78
pass
79
79
80
- defaults = inspection .getargspec ("spam" , spam )[ 1 ][ 3 ]
80
+ defaults = inspection .getfuncprops ("spam" , spam ). argspec . defaults
81
81
self .assertEqual (repr (defaults [0 ]), "23" )
82
82
self .assertEqual (repr (defaults [1 ]), "'yay'" )
83
83
0 commit comments