@@ -34,8 +34,7 @@ def test_compiling_pipeline_with_invalid_run_name_fails(
3434):
3535 """Tests that compiling a pipeline with an invalid run name fails."""
3636 pipeline_instance = empty_pipeline
37- with pipeline_instance :
38- pipeline_instance .entrypoint ()
37+ pipeline_instance .prepare ()
3938 with pytest .raises (ValueError ):
4039 Compiler ().compile (
4140 pipeline = pipeline_instance ,
@@ -54,8 +53,7 @@ def _no_step_pipeline():
5453def test_compiling_pipeline_without_steps_fails (local_stack ):
5554 """Tests that compiling a pipeline without steps fails."""
5655 pipeline_instance = _no_step_pipeline
57- with pipeline_instance :
58- pipeline_instance .entrypoint ()
56+ pipeline_instance .prepare ()
5957 with pytest .raises (ValueError ):
6058 Compiler ().compile (
6159 pipeline = pipeline_instance ,
@@ -71,8 +69,7 @@ def test_compiling_pipeline_with_missing_step_operator(
7169 pipeline_instance = one_step_pipeline (
7270 empty_step .configure (step_operator = "s" )
7371 )
74- with pipeline_instance :
75- pipeline_instance .entrypoint ()
72+ pipeline_instance .prepare ()
7673 with pytest .raises (StackValidationError ):
7774 Compiler ().compile (
7875 pipeline = pipeline_instance ,
@@ -89,8 +86,7 @@ def test_compiling_pipeline_with_missing_experiment_tracker(
8986 pipeline_instance = one_step_pipeline (
9087 empty_step .configure (experiment_tracker = "e" )
9188 )
92- with pipeline_instance :
93- pipeline_instance .entrypoint ()
89+ pipeline_instance .prepare ()
9490 with pytest .raises (StackValidationError ):
9591 Compiler ().compile (
9692 pipeline = pipeline_instance ,
@@ -113,8 +109,7 @@ def test_pipeline_and_steps_dont_get_modified_during_compilation(
113109 "_empty_step" : StepConfigurationUpdate (extra = {"key" : "new_value" })
114110 },
115111 )
116- with pipeline_instance :
117- pipeline_instance .entrypoint ()
112+ pipeline_instance .prepare ()
118113 Compiler ().compile (
119114 pipeline = pipeline_instance ,
120115 stack = local_stack ,
@@ -148,8 +143,7 @@ def pipeline_instance():
148143 empty_step (id = "step_1" )
149144 empty_step (id = "step_2" , after = "step_1" )
150145
151- with pipeline_instance :
152- pipeline_instance .entrypoint ()
146+ pipeline_instance .prepare ()
153147 snapshot = Compiler ().compile (
154148 pipeline = pipeline_instance ,
155149 stack = local_stack ,
@@ -204,8 +198,7 @@ class StubSettings(BaseSettings):
204198 )
205199 },
206200 )
207- with pipeline_instance :
208- pipeline_instance .entrypoint ()
201+ pipeline_instance .prepare ()
209202 snapshot = Compiler ().compile (
210203 pipeline = pipeline_instance ,
211204 stack = local_stack ,
@@ -252,8 +245,7 @@ def test_general_settings_merging(one_step_pipeline, empty_step, local_stack):
252245 )
253246 },
254247 )
255- with pipeline_instance :
256- pipeline_instance .entrypoint ()
248+ pipeline_instance .prepare ()
257249 snapshot = Compiler ().compile (
258250 pipeline = pipeline_instance ,
259251 stack = local_stack ,
@@ -299,8 +291,7 @@ def test_extra_merging(one_step_pipeline, empty_step, local_stack):
299291 steps = {"_empty_step" : StepConfigurationUpdate (extra = run_step_extra )},
300292 )
301293
302- with pipeline_instance :
303- pipeline_instance .entrypoint ()
294+ pipeline_instance .prepare ()
304295
305296 snapshot = Compiler ().compile (
306297 pipeline = pipeline_instance ,
@@ -358,8 +349,7 @@ def test_success_hook_merging(
358349 },
359350 )
360351
361- with pipeline_instance :
362- pipeline_instance .entrypoint ()
352+ pipeline_instance .prepare ()
363353 snapshot = Compiler ().compile (
364354 pipeline = pipeline_instance ,
365355 stack = local_stack ,
@@ -409,8 +399,7 @@ def test_failure_hook_merging(
409399 },
410400 )
411401
412- with pipeline_instance :
413- pipeline_instance .entrypoint ()
402+ pipeline_instance .prepare ()
414403 snapshot = Compiler ().compile (
415404 pipeline = pipeline_instance ,
416405 stack = local_stack ,
@@ -453,8 +442,7 @@ def test_stack_component_settings_for_missing_component_are_ignored(
453442 steps = {"_empty_step" : StepConfigurationUpdate (settings = settings )},
454443 )
455444
456- with pipeline_instance :
457- pipeline_instance .entrypoint ()
445+ pipeline_instance .prepare ()
458446 snapshot = Compiler ().compile (
459447 pipeline = pipeline_instance ,
460448 stack = local_stack ,
@@ -500,8 +488,7 @@ class StubSettings(BaseSettings):
500488 steps = {"_empty_step" : StepConfigurationUpdate (settings = settings )},
501489 )
502490
503- with pipeline_instance :
504- pipeline_instance .entrypoint ()
491+ pipeline_instance .prepare ()
505492 snapshot = Compiler ().compile (
506493 pipeline = pipeline_instance ,
507494 stack = local_stack ,
@@ -551,8 +538,7 @@ class StubSettings(BaseSettings):
551538 steps = {"_empty_step" : StepConfigurationUpdate (settings = settings )},
552539 )
553540
554- with pipeline_instance :
555- pipeline_instance .entrypoint ()
541+ pipeline_instance .prepare ()
556542 snapshot = Compiler ().compile (
557543 pipeline = pipeline_instance ,
558544 stack = local_stack ,
@@ -585,8 +571,7 @@ def test_spec_compilation(local_stack):
585571 def pipeline_instance ():
586572 s2 (s1 ())
587573
588- with pipeline_instance :
589- pipeline_instance .entrypoint ()
574+ pipeline_instance .prepare ()
590575 spec = (
591576 Compiler ()
592577 .compile (
@@ -652,8 +637,7 @@ class StubSettings(BaseSettings):
652637 settings = {"orchestrator" : shortcut_settings }
653638 )
654639
655- with pipeline_instance_with_shortcut_settings :
656- pipeline_instance_with_shortcut_settings .entrypoint ()
640+ pipeline_instance_with_shortcut_settings .prepare ()
657641
658642 with does_not_raise ():
659643 snapshot = Compiler ().compile (
@@ -677,8 +661,7 @@ class StubSettings(BaseSettings):
677661 }
678662 )
679663
680- with pipeline_instance_with_duplicate_settings :
681- pipeline_instance_with_duplicate_settings .entrypoint ()
664+ pipeline_instance_with_duplicate_settings .prepare ()
682665
683666 with pytest .raises (ValueError ):
684667 snapshot = Compiler ().compile (
0 commit comments