summaryrefslogtreecommitdiff
path: root/passlib/tests/utils.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2011-07-11 10:17:11 -0400
committerEli Collins <elic@assurancetechnologies.com>2011-07-11 10:17:11 -0400
commit3ef80daaa8926b9df2caa98d33963629333653a0 (patch)
treebbd69ac6f0b833009bb7f5d18daa9e86857be8c3 /passlib/tests/utils.py
parent5eddfb2db235dbb77b88758e8eaf7841a2835271 (diff)
downloadpasslib-3ef80daaa8926b9df2caa98d33963629333653a0.tar.gz
added TestCase.__test__ helper to fix test runner mistakes if used w/ plain UT2
Diffstat (limited to 'passlib/tests/utils.py')
-rw-r--r--passlib/tests/utils.py5
1 files changed, 5 insertions, 0 deletions
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
#============================================================