diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-25 09:39:14 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-25 09:39:14 (GMT) |
commit | 4a22b5dee77b6a3439e4a09362586c390bbdef02 (patch) | |
tree | 670472c02e788fe4d027f7967fbbd8253e18cb5f /Lib/test/test_inspect.py | |
parent | 91c77301bf0246deabcdcd80bc7bedb169e2f964 (diff) | |
download | cpython-4a22b5dee77b6a3439e4a09362586c390bbdef02.zip cpython-4a22b5dee77b6a3439e4a09362586c390bbdef02.tar.gz cpython-4a22b5dee77b6a3439e4a09362586c390bbdef02.tar.bz2 |
Patch from Georg Brandl and me for #1493
Remove unbound method objects
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r-- | Lib/test/test_inspect.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 1858372..3752810 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -65,7 +65,7 @@ class TestPredicates(IsTestBase): self.istest(inspect.iscode, 'mod.spam.__code__') self.istest(inspect.isframe, 'tb.tb_frame') self.istest(inspect.isfunction, 'mod.spam') - self.istest(inspect.ismethod, 'mod.StupidGit.abuse') + self.istest(inspect.isfunction, 'mod.StupidGit.abuse') self.istest(inspect.ismethod, 'git.argue') self.istest(inspect.ismodule, 'mod') self.istest(inspect.istraceback, 'tb') @@ -395,7 +395,8 @@ class TestClassesAndFunctions(unittest.TestCase): self.assert_(('s', 'static method', A) in attrs, 'missing static method') self.assert_(('c', 'class method', A) in attrs, 'missing class method') self.assert_(('p', 'property', A) in attrs, 'missing property') - self.assert_(('m', 'method', A) in attrs, 'missing plain method') + self.assert_(('m', 'method', A) in attrs, + 'missing plain method: %r' % attrs) self.assert_(('m1', 'method', A) in attrs, 'missing plain method') self.assert_(('datablob', 'data', A) in attrs, 'missing data') |