diff options
author | Kumar McMillan <kumar.mcmillan@gmail.com> | 2008-04-30 19:32:14 +0000 |
---|---|---|
committer | Kumar McMillan <kumar.mcmillan@gmail.com> | 2008-04-30 19:32:14 +0000 |
commit | 9a5d74bf585e0004ada95d4aaa6e3cb0b8d8a837 (patch) | |
tree | 7374d0169bc1760f33847acdf54911b374c0101d /unit_tests/test_utils.py | |
parent | e7097bd484e8ebc9f204c8e204f0d507439f50ac (diff) | |
download | nose-9a5d74bf585e0004ada95d4aaa6e3cb0b8d8a837.tar.gz |
fixing test_address() so that it is compatible with unittest.TestCase classes which define __metaclass__ -- see http://code.google.com/p/python-nose/issues/detail?id=153
Diffstat (limited to 'unit_tests/test_utils.py')
-rw-r--r-- | unit_tests/test_utils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/unit_tests/test_utils.py b/unit_tests/test_utils.py index ede573a..e7da73c 100644 --- a/unit_tests/test_utils.py +++ b/unit_tests/test_utils.py @@ -74,6 +74,15 @@ class TestUtils(unittest.TestCase): def test_two(self): pass + class CustomTestType(type): + pass + class CustomTC(unittest.TestCase): + __metaclass__ = CustomTestType + def test_one(self): + pass + def test_two(self): + pass + foo_funct = case.FunctionTestCase(baz) foo_functu = unittest.FunctionTestCase(baz) @@ -93,6 +102,8 @@ class TestUtils(unittest.TestCase): # missed test plugin must do self.assertEqual(test_address(FooTC('test_one')), (me, __name__, 'FooTC.test_one')) + self.assertEqual(test_address(CustomTC('test_one')), + (me, __name__, 'CustomTC.test_one')) self.assertEqual(test_address(foo_funct), (me, __name__, 'baz')) self.assertEqual(test_address(foo_functu), |