-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Revert "feat: speed up SmartTask and SmartFuture init (#433)" This reverts commit 8bc2aba. * feat(test): test SmartTask creation * chore: `black .` --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
8bc2aba
commit 8a8ee41
Showing
2 changed files
with
17 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import asyncio | ||
import pytest | ||
|
||
from a_sync._smart import SmartTask | ||
|
||
|
||
@pytest.mark.asyncio_cooperative | ||
async def test_smart_task_await(): | ||
await SmartTask(asyncio.sleep(0.1), loop=None) | ||
|
||
|
||
@pytest.mark.asyncio_cooperative | ||
async def test_smart_task_name(): | ||
t = SmartTask(asyncio.sleep(0.1), loop=None, name="test") | ||
assert t.get_name() == "test" |