webdriver_test_tools.project.test_module module¶
Functions for test project __main__ modules
-
webdriver_test_tools.project.test_module.main(tests_module, config_module=None, package_name=None)[source]¶ Function to call in test modules
if __name__ == '__main__'at run timeCommands will return an exit code, which is passed to
sys.exit(). If an exception is caught during execution, the exit code is set to 1 and the error message is printed out.If the command is not recognized, but somehow execution continues after
parser.parse_args()is called, a help message will be printed and the exit code will be set to 1.- Parameters
tests_module – The module object for
<test_project>.testsconfig_module – (Optional) The module object for
<test_project>.config. Will usewebdriver_test_tools.configif not specifiedpackage_name – (Optional) The name of the package (i.e.
__package__)
-
webdriver_test_tools.project.test_module.get_parser(config_module=None, package_name=None)[source]¶ Returns the
ArgumentParserobject for use withmain()- Parameters
config_module – (Optional) The module object for
<test_project>.config. Will usewebdriver_test_tools.configif not specified if unspecifiedpackage_name – (Optional) The name of the package (i.e.
__package__)
- Returns
ArgumentParserfor the test package