Skip to content

Commit b5cc45e

Browse files
committed
While pytest implicitly converts monkeypatched env vars to strings, I don't like warnings. This fixes that.
1 parent 028a1a1 commit b5cc45e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/unit_tests/asyncio_/test_env_vars.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
def test_env_vars(monkeypatch):
5-
monkeypatch.setenv("SUBSTRATE_CACHE_METHOD_SIZE", 10)
6-
monkeypatch.setenv("SUBSTRATE_RUNTIME_CACHE_SIZE", 9)
5+
monkeypatch.setenv("SUBSTRATE_CACHE_METHOD_SIZE", "10")
6+
monkeypatch.setenv("SUBSTRATE_RUNTIME_CACHE_SIZE", "9")
77
async_substrate = import_fresh("async_substrate_interface.async_substrate")
88
asi = async_substrate.AsyncSubstrateInterface("", _mock=True)
99
assert asi.get_runtime_for_version._max_size == 9

tests/unit_tests/sync/test_env_vars.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
def test_env_vars(monkeypatch):
5-
monkeypatch.setenv("SUBSTRATE_CACHE_METHOD_SIZE", 10)
6-
monkeypatch.setenv("SUBSTRATE_RUNTIME_CACHE_SIZE", 9)
5+
monkeypatch.setenv("SUBSTRATE_CACHE_METHOD_SIZE", "10")
6+
monkeypatch.setenv("SUBSTRATE_RUNTIME_CACHE_SIZE", "9")
77
sync_substrate = import_fresh("async_substrate_interface.sync_substrate")
88
asi = sync_substrate.SubstrateInterface("", _mock=True)
99
assert asi.get_runtime_for_version.cache_parameters()["maxsize"] == 9

0 commit comments

Comments
 (0)