(
pattern: Pattern[str],
match_substring: bool,
normalize_white_space: bool,
ignoreCase: Optional[bool] = None,
)
| 1066 | |
| 1067 | |
| 1068 | def expected_regex( |
| 1069 | pattern: Pattern[str], |
| 1070 | match_substring: bool, |
| 1071 | normalize_white_space: bool, |
| 1072 | ignoreCase: Optional[bool] = None, |
| 1073 | ) -> ExpectedTextValue: |
| 1074 | expected = ExpectedTextValue( |
| 1075 | regexSource=pattern.pattern, |
| 1076 | regexFlags=escape_regex_flags(pattern), |
| 1077 | matchSubstring=match_substring, |
| 1078 | normalizeWhiteSpace=normalize_white_space, |
| 1079 | ignoreCase=ignoreCase, |
| 1080 | ) |
| 1081 | if expected["ignoreCase"] is None: |
| 1082 | del expected["ignoreCase"] |
| 1083 | return expected |
| 1084 | |
| 1085 | |
| 1086 | def to_expected_text_values( |
no test coverage detected