MCPcopy Index your code
hub / github.com/microsoft/playwright-python / expected_regex

Function expected_regex

playwright/_impl/_assertions.py:1068–1083  ·  view source on GitHub ↗
(
    pattern: Pattern[str],
    match_substring: bool,
    normalize_white_space: bool,
    ignoreCase: Optional[bool] = None,
)

Source from the content-addressed store, hash-verified

1066
1067
1068def 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
1086def to_expected_text_values(

Callers 1

to_expected_text_valuesFunction · 0.85

Calls 2

ExpectedTextValueClass · 0.90
escape_regex_flagsFunction · 0.90

Tested by

no test coverage detected