stestr list Command

List the tests from a project and show them.

class stestr.commands.list.List(app, app_args, cmd_name=None)[source]

List the tests for a project.

You can use a filter just like with the run command to see exactly what tests match.

get_parser(prog_name)[source]

Return an argparse.ArgumentParser.

take_action(parsed_args)[source]

Override to do something useful.

The returned value will be returned by the program.

stestr.commands.list.list_command(config='.stestr.conf', repo_type='file', repo_url=None, test_path=None, top_dir=None, group_regex=None, blacklist_file=None, exclude_list=None, whitelist_file=None, include_list=None, black_regex=None, exclude_regex=None, filters=None, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]

Print a list of test_ids for a project

This function will print the test_ids for tests in a project. You can filter the output just like with the run command to see exactly what will be run.

Parameters:
  • config (str) – The path to the stestr config file. Must be a string.
  • repo_type (str) – This is the type of repository to use. Valid choices are ‘file’ and ‘sql’.
  • repo_url (str) – The url of the repository to use.
  • test_path (str) – Set the test path to use for unittest discovery. If both this and the corresponding config file option are set, this value will be used.
  • top_dir (str) – The top dir to use for unittest discovery. This takes precedence over the value in the config file. (if one is present in the config file)
  • group_regex (str) – Set a group regex to use for grouping tests together in the stestr scheduler. If both this and the corresponding config file option are set this value will be used.
  • blacklist_file (str) – DEPRECATED: soon to be replaced by the new option exclude_list below. If this is specified at the same time as exclude_list , this flag will be ignored and exclude_list will be used
  • exclude_list (str) – Path to an exclusion list file, this file contains a separate regex exclude on each newline.
  • whitelist_file (str) – DEPRECATED: soon to be replaced by the new option include_list below. If this is specified at the same time as include_list , this flag will be ignored and include_list will be used
  • include_list (str) – Path to an inclusion list file, this file contains a separate regex on each newline.
  • black_regex (str) – DEPRECATED: soon to be replaced by the new option exclude_regex below. If this is specified at the same time as exclude_regex, this flag will be ignored and exclude_regex will be used
  • exclude_regex (str) – Test rejection regex. If a test cases name matches on re.search() operation, it will be removed from the final test list.
  • filters (list) – A list of string regex filters to initially apply on the test list. Tests that match any of the regexes will be used. (assuming any other filtering specified also uses it)
  • stdout (file) – The output file to write all output to. By default this is sys.stdout