Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

testlib: always run a given setup_func

  • Loading branch information...
commit e9ce022db64f30f504aaf6364eb3d6c28e982ed1 1 parent dfbb5f0
Trent Mick authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/testlib.py
6 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.
Please sign in to comment.
Something went wrong with that request. Please try again.