Beispiel #1
0
 def test_is_object_or_method(self):
     doc = pydoc.Doc()
     # Bound Method
     self.assertTrue(pydoc._is_some_method(doc.fail))
     # Method Descriptor
     self.assertTrue(pydoc._is_some_method(int.__add__))
     # String
     self.assertFalse(pydoc._is_some_method("I am not a method"))
Beispiel #2
0
 def test_is_object_or_method(self):
     doc = pydoc.Doc()
     # Bound Method
     self.assertTrue(pydoc._is_some_method(doc.fail))
     # Method Descriptor
     self.assertTrue(pydoc._is_some_method(int.__add__))
     # String
     self.assertFalse(pydoc._is_some_method("I am not a method"))
Beispiel #3
0
 def test_is_object_or_method(self):
     doc = pydoc.Doc()
     self.assertTrue(pydoc._is_some_method(doc.fail))
     self.assertTrue(pydoc._is_some_method(int.__add__))
     self.assertFalse(pydoc._is_some_method('I am not a method'))