-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: refactor use of workers, fix loading state * fix: use pilot.pause() to await cpu idle in tests * chore: update changelog
- Loading branch information
Showing
5 changed files
with
68 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,9 @@ | ||
from pathlib import Path | ||
|
||
import pytest | ||
from textual.app import App | ||
|
||
|
||
@pytest.fixture | ||
def data_dir() -> Path: | ||
here = Path(__file__) | ||
return here.parent / "data" | ||
|
||
|
||
class TestHelpers: | ||
@staticmethod | ||
async def await_data_loaded(app: App) -> None: | ||
# when the query is submitted, it should update app.query_text, app.relation, | ||
# and app.data using three different workers. | ||
await app.workers.wait_for_complete() | ||
await app.workers.wait_for_complete() | ||
await app.workers.wait_for_complete() | ||
|
||
|
||
@pytest.fixture | ||
def helpers() -> TestHelpers: | ||
return TestHelpers() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters