Add some wiggle room to the no-matches command palette timeout test

See #3700.
This commit is contained in:
Dave Pearson
2023-11-20 12:28:17 +00:00
parent 018479edf0
commit 01cfdf8848

View File

@@ -18,7 +18,9 @@ async def test_no_results() -> None:
assert results.visible is False
assert results.option_count == 0
await pilot.press("a")
await pilot.pause(delay=CommandPalette._NO_MATCHES_COUNTDOWN)
# https://github.com/Textualize/textual/issues/3700 -- note the
# little bit of wiggle room to allow for Windows.
await pilot.pause(delay=CommandPalette._NO_MATCHES_COUNTDOWN + 0.1)
assert results.visible is True
assert results.option_count == 1
assert "No matches found" in str(results.get_option_at_index(0).prompt)