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_url=None, test_path=None, top_dir=None, group_regex=None, exclude_list=None, include_list=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_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.
  • exclude_list (str) – Path to an exclusion list file, this file contains a separate regex exclude on each newline.
  • include_list (str) – Path to an inclusion list file, this file contains a separate regex on each newline.
  • 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