@@ -54,7 +54,8 @@ func TestPythonSupportPluginManualRunAndDependencies(t *testing.T) {
5454 }
5555 }
5656 program := "import os, sys\n print(sys.prefix)\n print(os.getcwd())\n print(sys.flags.dev_mode, os.environ['PROFILE_TEST'], repr(sys.argv[1:]))\n "
57- write (filepath .Join (root , "requirements.txt" ), "root-demo==1.0\n " )
57+ // A Conda environment file is this workspace's only build marker.
58+ write (filepath .Join (root , "environment.yml" ), "name: manual-run\n dependencies:\n - python\n " )
5859 write (filepath .Join (root , "manual script.py" ), program )
5960 write (filepath .Join (work , "manual_module.py" ), program )
6061 purelib := strings .TrimSpace (string (site ))
@@ -169,18 +170,22 @@ func TestPythonSupportPluginManualRunAndDependencies(t *testing.T) {
169170 })
170171 }
171172
172- var instance * buildInstance
173+ var instanceIndex int
173174 awaitStateWithin (t , h , 10 * time .Second , "the Python model with a project" , func () bool {
174175 for index := range p .build .instances {
175176 candidate := & p .build .instances [index ]
176177 if candidate .BuildSystemID == "python" && candidate .modelLoaded && len (candidate .Model .Projects ) == 1 {
177- instance = candidate
178+ instanceIndex = index
178179 return true
179180 }
180181 }
181182 return false
182183 })
183- h .app .post (func (a * App ) { a .reduceChrome (core .SetChromeOpen (itemBuild , true )) })
184+ instance := & p .build .instances [instanceIndex ]
185+ h .app .post (func (a * App ) {
186+ a .selectBuildInstance (p , instanceIndex )
187+ a .reduceChrome (core .SetChromeOpen (itemBuild , true ))
188+ })
184189 var section buildRow
185190 awaitStateWithin (t , h , 10 * time .Second , "the Dependencies section in the Build panel" , func () bool {
186191 rows , _ := h .app .buildTreeRows (p )
0 commit comments