Skip to content

Commit

Permalink
increased test timeout of research tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nerfZael committed Jun 28, 2024
1 parent 4c2d438 commit 6532b06
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions autotx/tests/agents/token/research/test_advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from autotx.tests.agents.token.research.test_research import get_top_token_addresses_by_market_cap
from autotx.eth_address import ETHAddress
from autotx.tests.conftest import MAX_TEST_TIMEOUT_SEC, SLOW_TEST_TIMEOUT_SEC
from autotx.tests.conftest import MAX_TEST_TIMEOUT_SEC
from autotx.utils.ethereum.get_erc20_balance import get_erc20_balance
from autotx.utils.ethereum.get_native_balance import get_native_balance

@pytest.mark.timeout(SLOW_TEST_TIMEOUT_SEC)
@pytest.mark.timeout(MAX_TEST_TIMEOUT_SEC)
def test_research_and_swap_many_tokens_subjective_simple(smart_account, auto_tx):
uni_address = ETHAddress(auto_tx.network.tokens["uni"])

Expand Down
4 changes: 2 additions & 2 deletions autotx/tests/agents/token/research/test_research_and_swap.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest

from autotx.tests.agents.token.research.test_research import get_top_token_addresses_by_market_cap
from autotx.tests.conftest import FAST_TEST_TIMEOUT_SEC, SLOW_TEST_TIMEOUT_SEC
from autotx.tests.conftest import FAST_TEST_TIMEOUT_SEC, MAX_TEST_TIMEOUT_SEC, SLOW_TEST_TIMEOUT_SEC
from autotx.utils.ethereum.get_erc20_balance import get_erc20_balance
from autotx.utils.ethereum.get_native_balance import get_native_balance

Expand All @@ -19,7 +19,7 @@ def test_research_and_buy_one(smart_account, auto_tx):
token_balance_in_safe = get_erc20_balance(smart_account.web3, token_address, smart_account.address)
assert token_balance_in_safe > 1000

@pytest.mark.timeout(SLOW_TEST_TIMEOUT_SEC)
@pytest.mark.timeout(MAX_TEST_TIMEOUT_SEC)
def test_research_and_buy_multiple(smart_account, auto_tx):

old_eth_balance = get_native_balance(smart_account.web3, smart_account.address)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import pytest

from autotx.tests.agents.token.research.test_research import get_top_token_addresses_by_market_cap
from autotx.tests.conftest import SLOW_TEST_TIMEOUT_SEC
from autotx.tests.conftest import MAX_TEST_TIMEOUT_SEC, SLOW_TEST_TIMEOUT_SEC
from autotx.utils.ethereum import get_erc20_balance
from autotx.utils.ethereum.get_native_balance import get_native_balance

DIFFERENCE_PERCENTAGE = 0.01

@pytest.mark.timeout(SLOW_TEST_TIMEOUT_SEC)
@pytest.mark.timeout(MAX_TEST_TIMEOUT_SEC)
def test_research_buy_one_send_one(smart_account, auto_tx, test_accounts):

receiver = test_accounts[0]
Expand All @@ -26,7 +26,7 @@ def test_research_buy_one_send_one(smart_account, auto_tx, test_accounts):

assert token_balance_in_safe / receiver_balance < DIFFERENCE_PERCENTAGE

@pytest.mark.timeout(SLOW_TEST_TIMEOUT_SEC)
@pytest.mark.timeout(MAX_TEST_TIMEOUT_SEC)
def test_research_buy_one_send_multiple(smart_account, auto_tx, test_accounts):

receiver_1 = test_accounts[0]
Expand All @@ -49,7 +49,7 @@ def test_research_buy_one_send_multiple(smart_account, auto_tx, test_accounts):

assert meme_token_balance_in_safe > 10000

@pytest.mark.timeout(SLOW_TEST_TIMEOUT_SEC)
@pytest.mark.timeout(MAX_TEST_TIMEOUT_SEC)
def test_research_buy_multiple_send_multiple(smart_account, auto_tx, test_accounts):

receiver_1 = test_accounts[0]
Expand Down

0 comments on commit 6532b06

Please sign in to comment.