Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #6527 #7143

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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")
Expand Down
15 changes: 3 additions & 12 deletions src/tribler/core/conftest.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
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
from tribler.core.utilities.network_utils import default_network_utils
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
Expand Down Expand Up @@ -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):
"""
Expand Down