-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Labels
Description
The tests in test/aio folder fail. I got around most of the failures with the patch lower on this page, but still I encounter some problems which I cannot resolve myself. Could you please take a look?
test_workspacegets stuck for some reasontest_event_exceptionandtest_tick_eventfail withRuntimeError: Task (...) got Future <Future pending> attached to a different loop
Patch:
Index: i3ipc-python-2.2.1/test/aio/ipctest.py
===================================================================
--- i3ipc-python-2.2.1.orig/test/aio/ipctest.py
+++ i3ipc-python-2.2.1/test/aio/ipctest.py
@@ -1,5 +1,9 @@
from subprocess import Popen
import pytest
+try:
+ from pytest_asyncio import fixture
+except ImportError:
+ from pytest import fixture
from i3ipc.aio import Connection
from i3ipc import CommandReply
@@ -15,11 +19,11 @@ class IpcTest:
timeout_thread = None
i3_conn = None
- @pytest.fixture(scope='class')
+ @fixture(scope='class')
def event_loop(self):
return asyncio.get_event_loop()
- @pytest.fixture(scope='class')
+ @fixture(scope='class')
async def i3(self):
process = Popen(['i3', '-c', 'test/i3.config'])
# wait for i3 to start up