File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
bittensor/core/subtensor_api Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,12 @@ pytest tests/unit_tests
234
234
- using a compiler based on the substrait code
235
235
- using an already built docker image (docker runner)
236
236
237
+ # ### Local environment variables:
238
+ - `LOCALNET_SH_PATH ` - path to `localnet.sh` script in cloned subtensor repository (for legacy runner);
239
+ - `BUILD_BINARY ` - (`=0 ` or `=1 ` ) - used with `LOCALNET_SH_PATH ` for build or not before start localnet node (for legacy runner);
240
+ - `USE_DOCKER ` - (`=0 ` or `=1 ` ) - used if you want to use specific runner to run e2e tests (for docker runner);
241
+ - `FAST_BLOCKS ` - (`=0 ` or `=1 ` ) - allows you to run a localnet node in fast or non- fast blocks mode (for both types of runers).
242
+
237
243
# ### Using `docker runner` (default for now):
238
244
- E2E tests with docker image do not require preliminary compilation
239
245
- are executed very quickly
Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ def add_legacy_methods(subtensor: "SubtensorApi"):
115
115
subtensor .min_allowed_weights = subtensor ._subtensor .min_allowed_weights
116
116
subtensor .move_stake = subtensor ._subtensor .move_stake
117
117
subtensor .network = subtensor ._subtensor .network
118
+ subtensor .neurons = subtensor ._subtensor .neurons
118
119
subtensor .neuron_for_uid = subtensor ._subtensor .neuron_for_uid
119
120
subtensor .neurons_lite = subtensor ._subtensor .neurons_lite
120
121
subtensor .query_constant = subtensor ._subtensor .query_constant
Original file line number Diff line number Diff line change 11
11
import pytest
12
12
from async_substrate_interface import SubstrateInterface
13
13
14
- from bittensor .core .async_subtensor import AsyncSubtensor
15
- from bittensor .core .subtensor import Subtensor
14
+ from bittensor .core .subtensor_api import SubtensorApi
16
15
from bittensor .utils .btlogging import logging
17
16
from tests .e2e_tests .utils .e2e_test_utils import (
18
17
Templates ,
@@ -258,12 +257,14 @@ def templates():
258
257
259
258
@pytest .fixture
260
259
def subtensor (local_chain ):
261
- return Subtensor (network = "ws://localhost:9944" )
260
+ return SubtensorApi (network = "ws://localhost:9944" , legacy_methods = True )
262
261
263
262
264
263
@pytest .fixture
265
264
def async_subtensor (local_chain ):
266
- return AsyncSubtensor (network = "ws://localhost:9944" )
265
+ return SubtensorApi (
266
+ network = "ws://localhost:9944" , legacy_methods = True , async_subtensor = True
267
+ )
267
268
268
269
269
270
@pytest .fixture
You can’t perform that action at this time.
0 commit comments