Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Waiter 0.1 #594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
Loading
from
Open
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tests(waiter) Eliminate test_wait_for_pane_content_exact_match
why:
- is not an exact match
- test_wait_for_pane_content_contains does the CONTAINS match
  • Loading branch information
tony committed Apr 6, 2025
commit c6633d7633e93c23b65ddb77ff5f14dd9b7038a5
21 changes: 0 additions & 21 deletions 21 tests/_internal/test_waiter.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,27 +672,6 @@ def test_wait_for_all_content_type_error(wait_pane: Pane) -> None:
)


def test_wait_for_pane_content_exact_match(wait_pane: Pane) -> None:
"""Test waiting for content with exact match."""
wait_pane.send_keys("clear", enter=True)

# Add a line with a predictable content
test_content = "EXACT_MATCH_TEST_STRING"
wait_pane.send_keys(f"echo '{test_content}'", enter=True)

# Instead of trying exact match on a line (which is prone to shell prompt
# variations) Let's test if the content contains our string
result = wait_for_pane_content(
wait_pane,
test_content,
ContentMatchType.CONTAINS, # Use CONTAINS instead of EXACT
timeout=5,
)

assert result.success
assert result.matched_content == test_content


def test_contains_match_function() -> None:
"""Test the _contains_match internal function."""
content = ["line 1", "test line 2", "line 3"]
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.