@@ -49,13 +49,6 @@ def local_chain(request):
49
49
50
50
# Pattern match indicates node is compiled and ready
51
51
pattern = re .compile (r"Imported #1" )
52
-
53
- # install neuron templates
54
- logging .info ("downloading and installing neuron templates from github" )
55
- # commit with subnet-template-repo changes for rust wallet
56
- templates_dir = clone_or_update_templates ()
57
- install_templates (templates_dir )
58
-
59
52
timestamp = int (time .time ())
60
53
61
54
def wait_for_node_start (process , pattern ):
@@ -87,7 +80,7 @@ def read_output():
87
80
wait_for_node_start (process , pattern )
88
81
89
82
# Run the test, passing in substrate interface
90
- yield SubstrateInterface (url = "ws://127.0.0.1:9945 " )
83
+ yield SubstrateInterface (url = "ws://127.0.0.1:9944 " )
91
84
92
85
# Terminate the process group (includes all child processes)
93
86
os .killpg (os .getpgid (process .pid ), signal .SIGTERM )
@@ -102,14 +95,25 @@ def read_output():
102
95
# Ensure the process has terminated
103
96
process .wait ()
104
97
105
- # uninstall templates
98
+
99
+ @pytest .fixture
100
+ def templates ():
101
+ logging .info ("downloading and installing neuron templates from github" )
102
+
103
+ templates_dir = clone_or_update_templates ()
104
+
105
+ install_templates (templates_dir )
106
+
107
+ yield templates_dir
108
+
106
109
logging .info ("uninstalling neuron templates" )
110
+
107
111
uninstall_templates (template_path )
108
112
109
113
110
114
@pytest .fixture
111
115
def subtensor (local_chain ):
112
- return Subtensor (network = "ws://localhost:9945 " )
116
+ return Subtensor (network = "ws://localhost:9944 " )
113
117
114
118
115
119
@pytest .fixture
0 commit comments