File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66from tempfile import NamedTemporaryFile
77import pytest
88
9- from juju import utils
9+ from juju import utils , jasyncio
1010
1111from .. import base
1212
@@ -160,7 +160,7 @@ def check_results(results, out):
160160async def test_scp ():
161161 # ensure that asyncio.subprocess will work;
162162 try :
163- asyncio .get_child_watcher ().attach_loop ()
163+ asyncio .get_child_watcher ().attach_loop (jasyncio . get_running_loop () )
164164 except RuntimeError :
165165 pytest .skip ('test_scp will always fail outside of MainThread' )
166166 async with base .CleanModel () as model :
@@ -193,7 +193,7 @@ async def test_scp():
193193async def test_ssh ():
194194 # ensure that asyncio.subprocess will work;
195195 try :
196- asyncio .get_child_watcher ().attach_loop ()
196+ asyncio .get_child_watcher ().attach_loop (jasyncio . get_running_loop () )
197197 except RuntimeError :
198198 pytest .skip ('test_ssh will always fail outside of MainThread' )
199199 async with base .CleanModel () as model :
You can’t perform that action at this time.
0 commit comments