Skip to content

Commit aaaf99b

Browse files
committed
Test methods
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent e18bab3 commit aaaf99b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bpython/test/test_inspection.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ class Noncallable(object):
4242
def spam():
4343
pass
4444

45+
class CallableMethod(object):
46+
def method(self):
47+
pass
48+
4549
self.assertTrue(inspection.is_callable(spam))
4650
self.assertTrue(inspection.is_callable(Callable))
4751
self.assertTrue(inspection.is_callable(Callable()))
@@ -50,6 +54,7 @@ def spam():
5054
self.assertFalse(inspection.is_callable(Noncallable()))
5155
self.assertFalse(inspection.is_callable(OldNoncallable()))
5256
self.assertFalse(inspection.is_callable(None))
57+
self.assertTrue(inspection.is_callable(CallableMethod().method))
5358

5459
def test_parsekeywordpairs(self):
5560
# See issue #109

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy