diff options
author | louiz’ <louiz@louiz.org> | 2020-05-05 21:09:38 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2020-05-05 21:09:38 +0200 |
commit | eb976918f95316c7d07b52f77430604a431c4814 (patch) | |
tree | 898fed03a5d27deb7cdff69d4f0ab0eccb180bad | |
parent | 10d683354b739ae2567c7898ae11479413dc475a (diff) | |
download | biboumi-eb976918f95316c7d07b52f77430604a431c4814.tar.gz biboumi-eb976918f95316c7d07b52f77430604a431c4814.tar.bz2 biboumi-eb976918f95316c7d07b52f77430604a431c4814.tar.xz biboumi-eb976918f95316c7d07b52f77430604a431c4814.zip |
e2e: Switch from coroutines to async, for python3.8
-rw-r--r-- | tests/end_to_end/__main__.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index dcf154d..bebc78c 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -135,10 +135,10 @@ class XMPPComponent(slixmpp.BaseXMPP): if self.biboumi: self.biboumi.stop() - @asyncio.coroutine - def accept_routine(self): - self.accepting_server = yield from self.loop.create_server(lambda: self, - "127.0.0.1", 8811, reuse_address=True) + + async def accept_routine(self): + self.accepting_server = await self.loop.create_server(lambda: self, + "127.0.0.1", 8811, reuse_address=True) class ProcessRunner: @@ -147,13 +147,11 @@ class ProcessRunner: self.signal_sent = False self.create = None - @asyncio.coroutine - def start(self): - self.process = yield from self.create + async def start(self): + self.process = await self.create - @asyncio.coroutine - def wait(self): - code = yield from self.process.wait() + async def wait(self): + code = await self.process.wait() return code def stop(self): |