From 3ef80daaa8926b9df2caa98d33963629333653a0 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Mon, 11 Jul 2011 10:17:11 -0400 Subject: added TestCase.__test__ helper to fix test runner mistakes if used w/ plain UT2 --- passlib/tests/utils.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'passlib') diff --git a/passlib/tests/utils.py b/passlib/tests/utils.py index cd8d93c..34c56ba 100644 --- a/passlib/tests/utils.py +++ b/passlib/tests/utils.py @@ -155,6 +155,11 @@ class TestCase(unittest.TestCase): def __unittest_skip__(cls): return not getattr(cls, "__test__", True) + @classproperty + def __test__(cls): + #so nose won't auto run *this* cls, but it will for subclasses + return cls is not TestCase and not cls.__name__.startswith("_") + #============================================================ # tweak msg formatting for some assert methods #============================================================ -- cgit v1.2.1