Skip to content

Commit

Permalink
Reorder setup and cleanup functions for readability
Browse files Browse the repository at this point in the history
As suggested on another patch, reordering these to have the setup
functions together for readability.

Partially-implements bp:resource-cleanup

Change-Id: I8e75d29edc62d30c2ba51f01a3bec490c88adde4
  • Loading branch information
ekhugen committed Dec 17, 2014
1 parent 9845a64 commit 5bd4cbf
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions tempest/test.py
Expand Up @@ -320,20 +320,6 @@ def tearDownClass(cls):
finally:
del trace # to avoid circular refs

@classmethod
def resource_setup(cls):
"""Class level resource setup for test cases.
"""
pass

@classmethod
def resource_cleanup(cls):
"""Class level resource cleanup for test cases.
Resource cleanup must be able to handle the case of partially setup
resources, in case a failure during `resource_setup` should happen.
"""
pass

@classmethod
def skip_checks(cls):
"""Class level skip checks. Subclasses verify in here all
Expand Down Expand Up @@ -362,6 +348,20 @@ def setup_clients(cls):
# specify which client is `client` and nothing else.
pass

@classmethod
def resource_setup(cls):
"""Class level resource setup for test cases.
"""
pass

@classmethod
def resource_cleanup(cls):
"""Class level resource cleanup for test cases.
Resource cleanup must be able to handle the case of partially setup
resources, in case a failure during `resource_setup` should happen.
"""
pass

def setUp(self):
super(BaseTestCase, self).setUp()
if not self.setUpClassCalled:
Expand Down

0 comments on commit 5bd4cbf

Please sign in to comment.