diff options
author | Christian Lyder Jacobsen <christian@paperlessreceipts.co.uk> | 2014-05-08 16:00:37 +0100 |
---|---|---|
committer | Christian Lyder Jacobsen <christian@paperlessreceipts.co.uk> | 2014-05-08 16:17:02 +0100 |
commit | fcd11ab9e2a3db760b4c82d65853a44f45e69d68 (patch) | |
tree | 4f345243886f335a9cb453d0cc1c620221f1fdd9 /unit_tests/test_utils.py | |
parent | 6f95c7dd363ed6626442279b841dc03f0b7a81d4 (diff) | |
download | nose-fcd11ab9e2a3db760b4c82d65853a44f45e69d68.tar.gz |
Fix for try_run when using bound methods
Diffstat (limited to 'unit_tests/test_utils.py')
-rw-r--r-- | unit_tests/test_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index cd9ba6e..df6a98c 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -170,16 +170,22 @@ class TestUtils(unittest.TestCase): def __call__(self, mod): pass + class Bar_method: + def method(self): + pass + foo = imp.new_module('foo') foo.bar = bar foo.bar_m = bar_m foo.i_bar = Bar() foo.i_bar_m = Bar_m() + foo.i_bar_m = Bar_method().method try_run(foo, ('bar',)) try_run(foo, ('bar_m',)) try_run(foo, ('i_bar',)) try_run(foo, ('i_bar_m',)) + try_run(foo, ('i_bar_method',)) if __name__ == '__main__': unittest.main() |