RenameTestCases¶
Enforce test case naming. This formatter capitalizes the first letter of the test case name, removes the trailing dot and
strips leading/trailing whitespaces. If capitalize_each_word is True, will capitalize each word in test case name.
Enabling the formatter
RenameTestCases is not included in default formatters.
You can enable it by using --select and --extend-select options.
It is also possible to configure replace_pattern parameter to find and replace a regex pattern. Use replace_to
to set a replacement value. This configuration:
replaces all occurrences of a given pattern with string 'foo':
Capitalize each word¶
If you set capitalize_each_word to True it will capitalize each word in the test case name:
will result in: