File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,8 @@ def test_isroutine(self):
402
402
self .assertFalse (inspect .isroutine (type ))
403
403
self .assertFalse (inspect .isroutine (int ))
404
404
self .assertFalse (inspect .isroutine (type ('some_class' , (), {})))
405
+ # partial
406
+ self .assertTrue (inspect .isroutine (functools .partial (mod .spam )))
405
407
406
408
def test_isclass (self ):
407
409
self .istest (inspect .isclass , 'mod.StupidGit' )
@@ -1693,6 +1695,7 @@ def function():
1693
1695
self .assertFalse (inspect .ismethoddescriptor (Owner .static_method ))
1694
1696
self .assertFalse (inspect .ismethoddescriptor (function ))
1695
1697
self .assertFalse (inspect .ismethoddescriptor (a_lambda ))
1698
+ self .assertTrue (inspect .ismethoddescriptor (functools .partial (function )))
1696
1699
1697
1700
def test_descriptor_being_a_class (self ):
1698
1701
class MethodDescriptorMeta (type ):
You can’t perform that action at this time.
0 commit comments