From 3418c6582525abafa93ccd189213681a1321ebdc Mon Sep 17 00:00:00 2001 From: bklvsky Date: Tue, 22 Oct 2024 09:51:14 +0000 Subject: [PATCH] Create new event loop for tests (AlmaLinux/build-system#367) --- tests/fixtures/pulp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/fixtures/pulp.py b/tests/fixtures/pulp.py index 490b4d2a..a84a3bdc 100644 --- a/tests/fixtures/pulp.py +++ b/tests/fixtures/pulp.py @@ -25,10 +25,14 @@ @pytest.fixture(autouse=True) def semaphore_patch(monkeypatch): + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) monkeypatch.setattr( "alws.utils.pulp_client.PULP_SEMAPHORE", asyncio.Semaphore(5), ) + yield + loop.close() @pytest.fixture(autouse=True)