Permalink
Browse files

testlib: always run a given setup_func

  • Loading branch information...
1 parent dfbb5f0 commit e9ce022db64f30f504aaf6364eb3d6c28e982ed1 @trentm committed Sep 9, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/testlib.py
View
@@ -49,7 +49,7 @@
# - Make the quiet option actually quiet.
__revision__ = "$Id$"
-__version_info__ = (0, 5, 0)
+__version_info__ = (0, 5, 1)
__version__ = '.'.join(map(str, __version_info__))
@@ -378,11 +378,11 @@ def tests_from_manifest_and_tags(testdir_from_ns, tags):
def test(testdir_from_ns, tags=[], setup_func=None):
log.debug("test(testdir_from_ns=%r, tags=%r, ...)",
testdir_from_ns, tags)
+ if setup_func is not None:
+ setup_func()
tests = list(tests_from_manifest_and_tags(testdir_from_ns, tags))
if not tests:
return None
- if tests and setup_func is not None:
- setup_func()
# Groups test cases into a test suite class given by their test module's
# "test_suite_class" hook, if any.

0 comments on commit e9ce022

Please sign in to comment.