Skip to content

Commit 9ae9610

Browse files
committed
update ethpm version
1 parent c78487a commit 9ae9610

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

conftest.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
)
1515

1616

17-
# TODO: Take out when ethpm issue https://github.com/ethpm/py-ethpm/issues/148
18-
# gets closed
19-
os.environ['WEB3_INFURA_PROJECT_ID'] = 'test-key'
20-
21-
2217
class PollDelayCounter:
2318
def __init__(self, initial_delay=0, max_delay=1, initial_step=0.01):
2419
self.initial_delay = initial_delay

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"eth-hash[pycryptodome]>=0.2.0,<1.0.0",
7474
"eth-typing>=2.0.0,<3.0.0",
7575
"eth-utils>=1.3.0,<2.0.0",
76-
"ethpm>=0.1.4a12,<1.0.0",
76+
"ethpm>=0.1.4a13,<1.0.0",
7777
"hexbytes>=0.1.0,<1.0.0",
7878
"lru-dict>=1.1.6,<2.0.0",
7979
"requests>=2.16.0,<3.0.0",

tests/core/providers/test_auto_provider.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
import importlib
2+
import os
23
import pytest
34

4-
from web3.auto import (
5-
infura,
6-
)
75
from web3.exceptions import (
86
InfuraKeyNotFound,
97
)
@@ -16,6 +14,14 @@
1614
load_provider_from_environment,
1715
)
1816

17+
# Ugly hack to import infura now that API KEY is required
18+
os.environ['WEB3_INFURA_API_KEY'] = 'test'
19+
from web3.auto import ( # noqa E402 isort:skip
20+
infura,
21+
)
22+
del os.environ['WEB3_INFURA_API_KEY']
23+
# end ugly hack
24+
1925

2026
@pytest.mark.parametrize(
2127
'uri, expected_type, expected_attrs',
@@ -46,7 +52,7 @@ def test_web3_auto_infura_empty_key(monkeypatch, caplog):
4652

4753
def test_web3_auto_infura_deleted_key(monkeypatch, caplog):
4854
monkeypatch.setenv('WEB3_INFURA_SCHEME', 'https')
49-
importlib.reload(infura)
55+
5056
monkeypatch.delenv('WEB3_INFURA_API_KEY', raising=False)
5157
monkeypatch.delenv('WEB3_INFURA_PROJECT_ID', raising=False)
5258

0 commit comments

Comments
 (0)