1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 20:11:20 +00:00

wa/commands: pep8 fixes

This commit is contained in:
Marc Bonnici 2018-07-03 14:30:04 +01:00
parent 6afd710bd1
commit c6ec7af665
5 changed files with 17 additions and 11 deletions

View File

@ -202,11 +202,13 @@ def create_template_workload(path, name, kind, class_name):
with open(source_file, 'w') as wfh:
wfh.write(render_template('{}_workload'.format(kind), {'name': name, 'class_name': class_name}))
def create_uiautomator_template_workload(path, name, kind, class_name):
uiauto_path = os.path.join(path, 'uiauto')
create_uiauto_project(uiauto_path, name)
create_template_workload(path, name, kind, class_name)
def create_uiauto_project(path, name):
package_name = 'com.arm.wa.uiauto.' + name.lower()
@ -247,6 +249,7 @@ create_funcs = {
'apkuiauto': create_uiautomator_template_workload,
}
# Utility functions
def render_template(name, params):
filepath = os.path.join(TEMPLATES_DIR, name)
@ -260,6 +263,7 @@ def get_class_name(name, postfix=''):
name = identifier(name)
return ''.join(map(capitalize, name.split('_'))) + postfix
def touch(path):
with open(path, 'w') as _:
pass

View File

@ -231,6 +231,7 @@ class RecordCommand(Command):
return output_path, file_name
class ReplayCommand(Command):
name = 'replay'

View File

@ -110,8 +110,9 @@ def get_rst_from_target(target):
def get_rst_for_global_config():
text = underline('Global Configuration')
text += 'These parameters control the behaviour of WA/run as a whole, they ' \
'should be set inside a config file (either located in $WA_USER_DIRECTORY/config.yaml ' \
'or one which is specified with -c), or into config/global section of the agenda.\n\n'
'should be set inside a config file (either located in ' \
'$WA_USER_DIRECTORY/config.yaml or one which is specified with -c), ' \
'or into config/global section of the agenda.\n\n'
cfg_points = MetaConfiguration.config_points + RunConfiguration.config_points
text += get_params_rst(cfg_points)