File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2110,6 +2110,7 @@ async def coro():
21102110
21112111 self .loop .run_until_complete (coro ())
21122112
2113+ @unittest .skipIf (sys .version_info < (3 , 7 ), "no contextvars in asyncio" )
21132114 def test_context_1 (self ):
21142115 cvar = contextvars .ContextVar ('cvar' , default = 'nope' )
21152116
@@ -2133,6 +2134,7 @@ async def main():
21332134 finally :
21342135 loop .close ()
21352136
2137+ @unittest .skipIf (sys .version_info < (3 , 7 ), "no contextvars in asyncio" )
21362138 def test_context_2 (self ):
21372139 cvar = contextvars .ContextVar ('cvar' , default = 'nope' )
21382140
@@ -2167,6 +2169,7 @@ def fut_on_done(fut):
21672169
21682170 self .assertEqual (cvar .get (), 'nope' )
21692171
2172+ @unittest .skipIf (sys .version_info < (3 , 7 ), "no contextvars in asyncio" )
21702173 def test_context_3 (self ):
21712174 # Run 100 Tasks in parallel, each modifying cvar.
21722175
You can’t perform that action at this time.
0 commit comments