@@ -49,13 +49,6 @@ def local_chain(request):
4949
5050 # Pattern match indicates node is compiled and ready
5151 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-
5952 timestamp = int (time .time ())
6053
6154 def wait_for_node_start (process , pattern ):
@@ -87,7 +80,7 @@ def read_output():
8780 wait_for_node_start (process , pattern )
8881
8982 # 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 " )
9184
9285 # Terminate the process group (includes all child processes)
9386 os .killpg (os .getpgid (process .pid ), signal .SIGTERM )
@@ -102,14 +95,25 @@ def read_output():
10295 # Ensure the process has terminated
10396 process .wait ()
10497
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+
106109 logging .info ("uninstalling neuron templates" )
110+
107111 uninstall_templates (template_path )
108112
109113
110114@pytest .fixture
111115def subtensor (local_chain ):
112- return Subtensor (network = "ws://localhost:9945 " )
116+ return Subtensor (network = "ws://localhost:9944 " )
113117
114118
115119@pytest .fixture
0 commit comments