@@ -62,22 +62,22 @@ def fails(spam=['-a', '-b']):
6262 self .assertEqual (str (['-a' , '-b' ]), default_arg_repr ,
6363 'This test is broken (repr does not match), fix me.' )
6464
65- argspec = inspection .getargspec ('fails' , fails )
66- defaults = argspec [ 1 ][ 3 ]
65+ argspec = inspection .getfuncprops ('fails' , fails )
66+ defaults = argspec . argspec . defaults
6767 self .assertEqual (str (defaults [0 ]), default_arg_repr )
6868
6969 def test_pasekeywordpairs_string (self ):
7070 def spam (eggs = "foo, bar" ):
7171 pass
7272
73- defaults = inspection .getargspec ("spam" , spam )[ 1 ][ 3 ]
73+ defaults = inspection .getfuncprops ("spam" , spam ). argspec . defaults
7474 self .assertEqual (repr (defaults [0 ]), "'foo, bar'" )
7575
7676 def test_parsekeywordpairs_multiple_keywords (self ):
7777 def spam (eggs = 23 , foobar = "yay" ):
7878 pass
7979
80- defaults = inspection .getargspec ("spam" , spam )[ 1 ][ 3 ]
80+ defaults = inspection .getfuncprops ("spam" , spam ). argspec . defaults
8181 self .assertEqual (repr (defaults [0 ]), "23" )
8282 self .assertEqual (repr (defaults [1 ]), "'yay'" )
8383
0 commit comments