Skip to content

Commit

Permalink
fix: update test case for timeouts
Browse files Browse the repository at this point in the history
now we're catching a ProviderError, not a ChainError
  • Loading branch information
z80dev committed Nov 7, 2023
1 parent caca14b commit 6af8f21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/functional/test_block_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pytest
from ethpm_types import HexBytes

from ape.exceptions import ChainError
from ape.exceptions import ChainError, ProviderError


def test_iterate_blocks(chain_that_mined_5):
Expand Down Expand Up @@ -144,6 +144,6 @@ def test_poll_blocks_timeout(
):
poller = chain_that_mined_5.blocks.poll_blocks(new_block_timeout=1)

with pytest.raises(ChainError, match=r"Timed out waiting for new block \(time_waited=1.\d+\)."):
with pytest.raises(ProviderError, match=r"Timed out waiting for next block."):
with PollDaemon("blocks", poller, lambda x: None, lambda: False):
time.sleep(1.5)

0 comments on commit 6af8f21

Please sign in to comment.