diff --git a/src/tribler/core/components/tunnel/tests/test_full_session/conftest.py b/src/tribler/core/components/tunnel/tests/test_full_session/conftest.py index 8e1ad8ab1b5..d3d87a3cb1c 100644 --- a/src/tribler/core/components/tunnel/tests/test_full_session/conftest.py +++ b/src/tribler/core/components/tunnel/tests/test_full_session/conftest.py @@ -1,14 +1,6 @@ -import asyncio - import pytest -@pytest.fixture -def event_loop(): - # We use a SelectorEventLoop on all platforms so our test suite should use a similar event loop. - return asyncio.SelectorEventLoop() - - def pytest_addoption(parser): parser.addoption('--tunneltests', action='store_true', dest="tunneltests", default=False, help="enable tunnel tests") diff --git a/src/tribler/core/conftest.py b/src/tribler/core/conftest.py index fec75c5e395..840fb5defbd 100644 --- a/src/tribler/core/conftest.py +++ b/src/tribler/core/conftest.py @@ -1,24 +1,22 @@ -import asyncio +import os import os import sys from pathlib import Path from unittest.mock import MagicMock +import pytest from aiohttp import web - from ipv8.keyvault.crypto import default_eccrypto from ipv8.keyvault.private.libnaclkey import LibNaCLSK from ipv8.util import succeed -import pytest - +from tribler.core.components.knowledge.db.knowledge_db import KnowledgeDatabase from tribler.core.components.libtorrent.download_manager.download import Download from tribler.core.components.libtorrent.download_manager.download_config import DownloadConfig from tribler.core.components.libtorrent.download_manager.download_manager import DownloadManager from tribler.core.components.libtorrent.settings import LibtorrentSettings from tribler.core.components.libtorrent.torrentdef import TorrentDef from tribler.core.components.metadata_store.db.store import MetadataStore -from tribler.core.components.knowledge.db.knowledge_db import KnowledgeDatabase from tribler.core.config.tribler_config import TriblerConfig from tribler.core.tests.tools.common import TESTS_DATA_DIR, TESTS_DIR from tribler.core.tests.tools.tracker.udp_tracker import UDPTracker @@ -26,7 +24,6 @@ from tribler.core.utilities.simpledefs import DLSTATUS_SEEDING from tribler.core.utilities.unicode import hexlify - # Enable origin tracking for coroutine objects in the current thread, so when a test does not handle # some coroutine properly, we can see a traceback with the name of the test which created the coroutine. # Note that the error can happen in an unrelated test where the unhandled task from the previous test @@ -234,12 +231,6 @@ def test_tdef(state_dir): return tdef -@pytest.fixture -def event_loop(): - # We use a SelectorEventLoop on all platforms so our test suite should use a similar event loop. - return asyncio.SelectorEventLoop() - - @pytest.fixture def loop(event_loop): """