Skip to content

Commit 5a8f495

Browse files
GitHKAndrei Neagu
and
Andrei Neagu
authored
fixed test for py38 (#32)
Co-authored-by: Andrei Neagu <[email protected]>
1 parent 0cf7dc9 commit 5a8f495

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

services/web/server/tests/integration/test_exporter.py

-34
Original file line numberDiff line numberDiff line change
@@ -161,39 +161,6 @@ def get_exported_projects() -> List[Path]:
161161
return [x for x in exporter_dir.glob("*.osparc")]
162162

163163

164-
@pytest.fixture
165-
async def monkey_patch_asyncio_subporcess(mocker):
166-
# TODO: The below bug is not allowing me to fully test,
167-
# mocking and waiting for an update
168-
# https://bugs.python.org/issue35621
169-
# this issue was patched in 3.8, no need
170-
if sys.version_info.major == 3 and sys.version_info.minor >= 8:
171-
raise RuntimeError(
172-
"Issue no longer present in this version of python, "
173-
"please remote this mock on python >= 3.8"
174-
)
175-
176-
import subprocess
177-
178-
async def create_subprocess_exec(*command, **extra_params):
179-
class MockResponse:
180-
def __init__(self, command, **kwargs):
181-
self.proc = subprocess.Popen(command, **extra_params)
182-
183-
async def communicate(self):
184-
return self.proc.communicate()
185-
186-
@property
187-
def returncode(self):
188-
return self.proc.returncode
189-
190-
mock_response = MockResponse(command, **extra_params)
191-
192-
return mock_response
193-
194-
mocker.patch("asyncio.create_subprocess_exec", side_effect=create_subprocess_exec)
195-
196-
197164
@pytest.fixture(scope="session")
198165
def push_services_to_registry(
199166
docker_registry: str, node_meta_schema: Dict
@@ -294,7 +261,6 @@ async def test_import_export_import(
294261
db_engine,
295262
redis_client,
296263
export_version,
297-
monkey_patch_asyncio_subporcess,
298264
simcore_services,
299265
monkey_patch_aiohttp_request_url,
300266
):

0 commit comments

Comments
 (0)