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> list command

Parameters
  • subparsersargparse._SubParsersAction object for the test package ArgumentParser (i.e. the object returned by the add_subparsers() method)

  • parents – (Default: []) Parent parsers for the list subparser

  • formatter_class – (Default: argparse.RawTextHelpFormatter) Class to use for the formatter_class parameter

Returns

argparse.ArgumentParser object for the newly added list subparser

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>.tests

  • args – 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>.tests

  • test_module_names – (Optional) Parsed arg for --module command line argument

  • skip_module_names – (Optional) Parsed arg for --skip-module command line argument

  • test_class_map – (Optional) Result of passing parsed arg for --test command line argument to parse_test_names()

  • skip_class_map – (Optional) Result of passing parsed arg for --skip command line argument to parse_test_names()

  • verbose – (Default = False) If True, print class and test method docstrings