1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-03 11:52:36 +01:00

utils: pep8 fixes

This commit is contained in:
Marc Bonnici
2018-07-02 12:24:10 +01:00
parent f74b7ae78c
commit 1a08b2a6c7
6 changed files with 23 additions and 10 deletions

View File

@@ -31,6 +31,7 @@ def activate_environment(name):
init_environment(name)
__active_environment = name
def init_environment(name):
"""
Create a new environment called ``name``, but do not set it as the
@@ -44,6 +45,7 @@ def init_environment(name):
raise ValueError(msg)
__environments[name] = []
def reset_environment(name=None):
"""
Reset method call tracking for environment ``name``. If ``name`` is
@@ -63,6 +65,7 @@ def reset_environment(name=None):
activate_environment('default')
__environments[__active_environment] = []
# The decorators:
def once_per_instance(method):
"""
@@ -81,6 +84,7 @@ def once_per_instance(method):
return wrapper
def once_per_class(method):
"""
The specified method will be invoked only once for all instances
@@ -100,6 +104,7 @@ def once_per_class(method):
return wrapper
def once(method):
"""
The specified method will be invoked only once within the