Skip to content

Commit c660e19

Browse files
authored
Merge pull request #177 from opentensor/fix/thewhaleking/set-env-vars-as-strings
Set env vars as str in unit test
2 parents 028a1a1 + b5cc45e commit c660e19

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)