From a7d72f8279a856c15d542c429fd7cc0b0ca56d4f Mon Sep 17 00:00:00 2001 From: drew2a Date: Mon, 31 Oct 2022 14:22:45 +0100 Subject: [PATCH] Remove async --- src/tribler/core/tests/test_check_os.py | 8 ++++---- src/tribler/core/tests/test_start_core.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tribler/core/tests/test_check_os.py b/src/tribler/core/tests/test_check_os.py index 76e63e9a021..97082b1a292 100644 --- a/src/tribler/core/tests/test_check_os.py +++ b/src/tribler/core/tests/test_check_os.py @@ -10,7 +10,7 @@ @patch('sys.exit') @patch('tribler.core.check_os.show_system_popup') -async def test_error_and_exit(mocked_show_system_popup, mocked_sys_exit): +def test_error_and_exit(mocked_show_system_popup, mocked_sys_exit): error_and_exit('title', 'text') mocked_show_system_popup.assert_called_once_with('title', 'text') mocked_sys_exit.assert_called_once_with(1) @@ -18,7 +18,7 @@ async def test_error_and_exit(mocked_show_system_popup, mocked_sys_exit): @patch_import(['faulthandler'], strict=True, enable=MagicMock()) @patch('tribler.core.check_os.open', new=MagicMock()) -async def test_enable_fault_handler(): +def test_enable_fault_handler(): import faulthandler enable_fault_handler(log_dir=MagicMock()) faulthandler.enable.assert_called_once() @@ -27,14 +27,14 @@ async def test_enable_fault_handler(): @patch_import(['faulthandler'], strict=True, always_raise_exception_on_import=True) @patch.object(Logger, 'error') @patch('tribler.core.check_os.open', new=MagicMock()) -async def test_enable_fault_handler_import_error(mocked_log_error: MagicMock): +def test_enable_fault_handler_import_error(mocked_log_error: MagicMock): enable_fault_handler(log_dir=MagicMock()) mocked_log_error.assert_called_once() @patch_import(['faulthandler'], strict=True, enable=MagicMock()) @patch('tribler.core.check_os.open', new=MagicMock()) -async def test_enable_fault_handler_log_dir_not_exists(): +def test_enable_fault_handler_log_dir_not_exists(): log_dir = MagicMock(exists=MagicMock(return_value=False), mkdir=MagicMock()) diff --git a/src/tribler/core/tests/test_start_core.py b/src/tribler/core/tests/test_start_core.py index 73dd331ed87..7b5f20842fc 100644 --- a/src/tribler/core/tests/test_start_core.py +++ b/src/tribler/core/tests/test_start_core.py @@ -10,7 +10,7 @@ @patch('asyncio.get_event_loop', new=MagicMock()) @patch('tribler.core.start_core.TriblerConfig.load', new=MagicMock()) @patch('tribler.core.start_core.core_session') -async def test_start_tribler_core_no_exceptions(mocked_core_session): +def test_start_tribler_core_no_exceptions(mocked_core_session): # test that base logic of tribler core runs without exceptions run_tribler_core_session(1, 'key', Path('.'), False) mocked_core_session.assert_called_once()