webdriver_test_tools.project.cmd.list module¶
-
webdriver_test_tools.project.cmd.list.add_list_subparser(subparsers, parents=[], formatter_class=<class 'argparse.RawTextHelpFormatter'>)[source]¶ Add subparser for the
<test_package> listcommand- Parameters
subparsers –
argparse._SubParsersActionobject for the test package ArgumentParser (i.e. the object returned by theadd_subparsers()method)parents – (Default:
[]) Parent parsers for the list subparserformatter_class – (Default:
argparse.RawTextHelpFormatter) Class to use for theformatter_classparameter
- Returns
argparse.ArgumentParserobject for the newly addedlistsubparser
-
webdriver_test_tools.project.cmd.list.parse_list_args(tests_module, args)[source]¶ Parse arguments and run the ‘list’ command
- Parameters
tests_module – The module object for
<test_project>.testsargs – The namespace returned by parser.parse_args()
- Returns
Exit code, 0 if no exceptions were encountered, 1 otherwise
Note
Technically, this will always return 0, as all fail states cause an exception to be raised. This is just to keep it consistent with other project cmd parse arg functions.
-
webdriver_test_tools.project.cmd.list.list_tests(tests_module, test_module_names=None, skip_module_names=None, test_class_map=None, skip_class_map=None, verbose=False)[source]¶ Print a list of available tests
- Parameters
tests_module – The module object for
<test_project>.teststest_module_names – (Optional) Parsed arg for
--modulecommand line argumentskip_module_names – (Optional) Parsed arg for
--skip-modulecommand line argumenttest_class_map – (Optional) Result of passing parsed arg for
--testcommand line argument toparse_test_names()skip_class_map – (Optional) Result of passing parsed arg for
--skipcommand line argument toparse_test_names()verbose – (Default = False) If True, print class and test method docstrings