Skip to content

Commit

Permalink
fix(test): fix test example
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Apr 20, 2024
1 parent d6b5b25 commit 4ae78d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
import os
import sys

import brownie
from brownie import network

sys.path.insert(0, os.path.abspath('.'))

brownie._CONFIG.settings['autofetch_sources'] = True

if not network.is_connected():
network.connect(os.environ["PYTEST_NETWORK"])
4 changes: 2 additions & 2 deletions tests/test_brownie_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
from dank_mids.brownie_patch.call import _patch_call


# must use from_explorer for gh testing workflow
# NOTE: we don't want tests to fail due to api limits
get_contract = eth_retry.auto_retry(brownie.Contract.from_explorer)
get_contract = eth_retry.auto_retry(brownie.Contract)
# must try from_explorer too
get_dank_contract = eth_retry.auto_retry(dank_mids.Contract.from_explorer)

@pytest.mark.asyncio_cooperative
Expand Down
4 changes: 0 additions & 4 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

import pytest

import brownie
import eth_retry

import examples.dank_brownie_example
Expand All @@ -10,7 +9,4 @@
@pytest.mark.asyncio_cooperative
@eth_retry.auto_retry # retry etherscan rate limit errors
async def test_dank_brownie_example():
with pytest.raises(ValueError):
await examples.dank_brownie_example._main()
brownie._CONFIG.settings['autofetch_sources'] = True
await examples.dank_brownie_example._main()

0 comments on commit 4ae78d5

Please sign in to comment.