diff --git a/.github/workflows/vars/pytest.env b/.github/workflows/vars/pytest.env index dd7bed86d1b..a14947a5b26 100644 --- a/.github/workflows/vars/pytest.env +++ b/.github/workflows/vars/pytest.env @@ -1,16 +1,16 @@ PYTEST_ARGUMENTS='--randomly-seed=1 --disable-warnings --reruns 1 --reruns-delay 1 --verbose --durations=3' PYTEST_CORE_ARGUMENTS='./src/tribler/core ${PYTEST_ARGUMENTS}' -PYTEST_CORE_ARGUMENTS_WIN='${PYTEST_CORE_ARGUMENTS}' +PYTEST_CORE_ARGUMENTS_WIN='${PYTEST_CORE_ARGUMENTS} --no-looptime' PYTEST_CORE_ARGUMENTS_LINUX='${PYTEST_CORE_ARGUMENTS} --looptime' PYTEST_CORE_ARGUMENTS_MAC='${PYTEST_CORE_ARGUMENTS} --looptime' PYTEST_TUNNELS_ARGUMENTS='./src/tribler/core/components/tunnel/tests/test_full_session --tunneltests ${PYTEST_ARGUMENTS}' -PYTEST_TUNNELS_ARGUMENTS_WIN='${PYTEST_TUNNELS_ARGUMENTS}' +PYTEST_TUNNELS_ARGUMENTS_WIN='${PYTEST_TUNNELS_ARGUMENTS} --no-looptime' PYTEST_TUNNELS_ARGUMENTS_LINUX='${PYTEST_TUNNELS_ARGUMENTS} --looptime' PYTEST_TUNNELS_ARGUMENTS_MAC='${PYTEST_TUNNELS_ARGUMENTS} --looptime' PYTEST_GUI_ARGUMENTS='./src/tribler/gui --guitests ${PYTEST_ARGUMENTS}' -PYTEST_GUI_ARGUMENTS_WIN='${PYTEST_GUI_ARGUMENTS}' +PYTEST_GUI_ARGUMENTS_WIN='${PYTEST_GUI_ARGUMENTS} --no-looptime' PYTEST_GUI_ARGUMENTS_LINUX='${PYTEST_GUI_ARGUMENTS} --looptime' PYTEST_GUI_ARGUMENTS_MAC='${PYTEST_GUI_ARGUMENTS} --looptime' diff --git a/src/tribler/core/components/ipv8/eva/transfer/tests/test_base.py b/src/tribler/core/components/ipv8/eva/transfer/tests/test_base.py index 054f44f0a5f..9e091a9c96c 100644 --- a/src/tribler/core/components/ipv8/eva/transfer/tests/test_base.py +++ b/src/tribler/core/components/ipv8/eva/transfer/tests/test_base.py @@ -39,10 +39,11 @@ async def transfer(): await protocol_task_group.wait() -@pytest.mark.looptime(start=42) def test_update(transfer: Transfer): # In this test we ensure that `transfer.update` method sets `time.time` value # to `transfer.updated` property. + transfer.loop.time = Mock(return_value=42) + transfer.update() assert transfer.updated == 42 @@ -252,9 +253,9 @@ async def test_format_attempt(transfer: Transfer): assert transfer._format_attempt(remains=0, maximum=3) == '3/3' -@pytest.mark.looptime(start=10) async def test_remaining(transfer: Transfer): # Imagine that now time is `10` and transfer has been updated in `0` + transfer.loop.time = Mock(return_value=10) transfer.updated = 0 assert transfer._remaining(5) == -5