Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaaaf99b

Browse files
committed
Test methods
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parente18bab3 commitaaaf99b

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
defspam():
4343
pass
4444

45+
classCallableMethod(object):
46+
defmethod(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
deftest_parsekeywordpairs(self):
5560
# See issue #109

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp