Test Selection Module¶
This module is used to deal with anything related to test selection in stestr.
- stestr.selection.construct_list(test_ids, regexes=None, exclude_list=None, include_list=None, exclude_regex=None)[source]¶
Filters the discovered test cases
- Parameters:
test_ids (list) – The set of test_ids to be filtered
regexes (list) – A list of regex filters to apply to the test_ids. The output will contain any test_ids which have a re.search() match for any of the regexes in this list. If this is None all test_ids will be returned
exclude_list (str) – The path to an exclusion_list file
include_list (str) – The path to an inclusion_list file
exclude_regex (str) – regex pattern to exclude tests
- Returns:
iterable of strings. The strings are full test_ids
- Return type:
set
- stestr.selection.filter_tests(filters, test_ids)[source]¶
Filter test_ids by the test_filters.
- Parameters:
filters (list) – A list of regex filters to apply to the test_ids. The output will contain any test_ids which have a re.search() match for any of the regexes in this list. If this is None all test_ids will be returned
test_ids (list) – A list of test_ids that will be filtered
- Returns:
A list of test ids.