From 39f52f8f3f5ddc890e5f4a0af1ec5f5d90dd3a01 Mon Sep 17 00:00:00 2001 From: dotX12 Date: Sun, 28 Apr 2024 01:04:54 +0300 Subject: [PATCH] Update tests, remove conftest code --- tests/conftest.py | 11 ----------- tests/test_recognize.py | 3 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index c264e92..e69de29 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,11 +0,0 @@ -import asyncio - -import pytest_asyncio - - -@pytest_asyncio.fixture(scope="session", autouse=True) -def event_loop(): - loop = asyncio.get_event_loop_policy().get_event_loop() - yield loop - loop.run_until_complete(asyncio.sleep(0.025)) - loop.close() diff --git a/tests/test_recognize.py b/tests/test_recognize.py index 510bc33..ced6a12 100644 --- a/tests/test_recognize.py +++ b/tests/test_recognize.py @@ -9,7 +9,8 @@ @pytest_asyncio.fixture(scope="session") async def song_bytes(): - yield await get_file_bytes(file="examples/data/Gloria.ogg") + bytes_data = await get_file_bytes(file="examples/data/Gloria.ogg") + yield bytes_data @pytest.mark.asyncio