1
##############################################################################
3
# Copyright (c) 2004-2008 Zope Corporation and Contributors.
6
# This software is subject to the provisions of the Zope Public License,
7
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11
# FOR A PARTICULAR PURPOSE.
13
##############################################################################
14
"""Generic features for the test runner.
16
$Id: __init__.py 86232 2008-05-03 15:09:33Z ctheune $
20
import zope.testing.testrunner.interfaces
23
class Feature(object):
24
"""A base class implementing no-op methods for the IFeature interface."""
26
zope.interface.implements(zope.testing.testrunner.interfaces.IFeature)
30
def __init__(self, runner):
33
def global_setup(self):
34
"""Executed once when the test runner is being set up."""
38
"""Executed once right before the actual tests get executed and after
39
all global setups have happened.
43
def layer_setup(self, layer):
44
"""Executed once after a layer was set up."""
47
def layer_teardown(self, layer):
48
"""Executed once after a layer was run."""
52
"""Executed once before each test."""
55
def test_teardown(self):
56
"""Executed once after each test."""
59
def early_teardown(self):
60
"""Executed once directly after all tests."""
63
def global_teardown(self):
64
"""Executed once after all tests where run and early teardowns have
69
"""Executed once after all tests have been run and all setup was