-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeff Laughlin
committed
Apr 18, 2020
1 parent
2a62610
commit 4c93d4d
Showing
3 changed files
with
23 additions
and
50 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,21 @@ | ||
"""Quick'n'dirty unit tests for provided fixtures and markers.""" | ||
import asyncio | ||
import pytest | ||
|
||
import pytest_asyncio.plugin | ||
|
||
from contextvars import ContextVar | ||
|
||
|
||
ctxvar = ContextVar('ctxvar') | ||
|
||
|
||
@pytest.fixture | ||
async def set_some_context(context): | ||
ctxvar.set('quarantine is fun') | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_test(set_some_context): | ||
# print ("Context in test:", list(context.items())) | ||
assert ctxvar.get() == 'quarantine is fun' |
This file was deleted.
Oops, something went wrong.