@@ -31,7 +31,7 @@ def test_split_windows(session):
3131 test_utils .get_workspace_file ("workspace/builder/two_pane.yaml" )
3232 )
3333
34- builder = WorkspaceBuilder (sconf = workspace )
34+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
3535
3636 window_count = len (session .windows ) # current window count
3737 assert len (session .windows ) == window_count
@@ -51,7 +51,7 @@ def test_split_windows_three_pane(session):
5151 test_utils .get_workspace_file ("workspace/builder/three_pane.yaml" )
5252 )
5353
54- builder = WorkspaceBuilder (sconf = workspace )
54+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
5555
5656 window_count = len (session .windows ) # current window count
5757 assert len (session .windows ) == window_count
@@ -75,7 +75,7 @@ def test_focus_pane_index(session):
7575 workspace = loader .expand (workspace )
7676 workspace = loader .trickle (workspace )
7777
78- builder = WorkspaceBuilder (sconf = workspace )
78+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
7979
8080 builder .build (session = session )
8181
@@ -154,7 +154,7 @@ def test_suppress_history(session):
154154 workspace = loader .expand (workspace )
155155 workspace = loader .trickle (workspace )
156156
157- builder = WorkspaceBuilder (sconf = workspace )
157+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
158158 builder .build (session = session )
159159
160160 inHistoryWindow = session .windows .get (window_name = "inHistory" )
@@ -207,7 +207,7 @@ def test_session_options(session):
207207 )
208208 workspace = loader .expand (workspace )
209209
210- builder = WorkspaceBuilder (sconf = workspace )
210+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
211211 builder .build (session = session )
212212
213213 _default_shell = session .show_option ("default-shell" )
@@ -225,7 +225,7 @@ def test_global_options(session):
225225 )
226226 workspace = loader .expand (workspace )
227227
228- builder = WorkspaceBuilder (sconf = workspace )
228+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
229229 builder .build (session = session )
230230
231231 _status_position = session .show_option ("status-position" , _global = True )
@@ -247,7 +247,7 @@ def test_global_session_env_options(session, monkeypatch):
247247 )
248248 workspace = loader .expand (workspace )
249249
250- builder = WorkspaceBuilder (sconf = workspace )
250+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
251251 builder .build (session = session )
252252
253253 _visual_silence = session .show_option ("visual-silence" , _global = True )
@@ -268,7 +268,7 @@ def test_window_options(session):
268268 if has_gte_version ("2.3" ):
269269 workspace ["windows" ][0 ]["options" ]["pane-border-format" ] = " #P "
270270
271- builder = WorkspaceBuilder (sconf = workspace )
271+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
272272
273273 window_count = len (session .windows ) # current window count
274274 assert len (session .windows ) == window_count
@@ -294,7 +294,7 @@ def test_window_options_after(session):
294294 )
295295 workspace = loader .expand (workspace )
296296
297- builder = WorkspaceBuilder (sconf = workspace )
297+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
298298 builder .build (session = session )
299299
300300 def assert_last_line (p , s ):
@@ -332,7 +332,7 @@ def test_window_shell(session):
332332 )
333333 workspace = loader .expand (workspace )
334334
335- builder = WorkspaceBuilder (sconf = workspace )
335+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
336336
337337 for w , wconf in builder .iter_create_windows (session ):
338338 if "window_shell" in wconf :
@@ -356,7 +356,7 @@ def test_environment_variables(session):
356356 )
357357 workspace = loader .expand (workspace )
358358
359- builder = WorkspaceBuilder (sconf = workspace )
359+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
360360 builder .build (session )
361361 # Give slow shells some time to settle as otherwise tests might fail.
362362 time .sleep (0.3 )
@@ -398,7 +398,7 @@ def test_environment_variables_logs(session: Session, caplog: pytest.LogCaptureF
398398 )
399399 workspace = loader .expand (workspace )
400400
401- builder = WorkspaceBuilder (sconf = workspace )
401+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
402402 builder .build (session )
403403
404404 # environment on sessions should work as this is done using set-environment
@@ -486,7 +486,7 @@ def test_blank_pane_count(session):
486486 test_config = ConfigReader ._from_file (yaml_workspace_file )
487487
488488 test_config = loader .expand (test_config )
489- builder = WorkspaceBuilder (sconf = test_config )
489+ builder = WorkspaceBuilder (sconf = test_config , server = session . server )
490490 builder .build (session = session )
491491
492492 assert session == builder .session
@@ -521,7 +521,7 @@ def test_start_directory(session, tmp_path: pathlib.Path):
521521 workspace = loader .expand (workspace )
522522 workspace = loader .trickle (workspace )
523523
524- builder = WorkspaceBuilder (sconf = workspace )
524+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
525525 builder .build (session = session )
526526
527527 assert session == builder .session
@@ -569,7 +569,7 @@ def test_start_directory_relative(session, tmp_path: pathlib.Path):
569569
570570 assert os .path .exists (config_dir )
571571 assert os .path .exists (test_dir )
572- builder = WorkspaceBuilder (sconf = workspace )
572+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
573573 builder .build (session = session )
574574
575575 assert session == builder .session
@@ -630,7 +630,7 @@ def test_pane_order(session):
630630 workspace = loader .expand (workspace )
631631 workspace = loader .trickle (workspace )
632632
633- builder = WorkspaceBuilder (sconf = workspace )
633+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
634634
635635 window_count = len (session .windows ) # current window count
636636 assert len (session .windows ) == window_count
@@ -671,7 +671,7 @@ def test_window_index(session):
671671 workspace = loader .expand (workspace )
672672 workspace = loader .trickle (workspace )
673673
674- builder = WorkspaceBuilder (sconf = workspace )
674+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
675675
676676 for window , _ in builder .iter_create_windows (session ):
677677 expected_index = name_index_map [window .window_name ]
@@ -690,7 +690,7 @@ def test_before_load_throw_error_if_retcode_error(server):
690690 workspace = loader .expand (workspace )
691691 workspace = loader .trickle (workspace )
692692
693- builder = WorkspaceBuilder (sconf = workspace )
693+ builder = WorkspaceBuilder (sconf = workspace , server = server )
694694
695695 with temp_session (server ) as sess :
696696 session_name = sess .name
@@ -713,7 +713,7 @@ def test_before_load_throw_error_if_file_not_exists(server):
713713 workspace = loader .expand (workspace )
714714 workspace = loader .trickle (workspace )
715715
716- builder = WorkspaceBuilder (sconf = workspace )
716+ builder = WorkspaceBuilder (sconf = workspace , server = server )
717717
718718 with temp_session (server ) as session :
719719 session_name = session .name
@@ -738,7 +738,7 @@ def test_before_load_true_if_test_passes(server):
738738 workspace = loader .expand (workspace )
739739 workspace = loader .trickle (workspace )
740740
741- builder = WorkspaceBuilder (sconf = workspace )
741+ builder = WorkspaceBuilder (sconf = workspace , server = server )
742742
743743 with temp_session (server ) as session :
744744 builder .build (session = session )
@@ -757,7 +757,7 @@ def test_before_load_true_if_test_passes_with_args(server):
757757 workspace = loader .expand (workspace )
758758 workspace = loader .trickle (workspace )
759759
760- builder = WorkspaceBuilder (sconf = workspace )
760+ builder = WorkspaceBuilder (sconf = workspace , server = server )
761761
762762 with temp_session (server ) as session :
763763 builder .build (session = session )
@@ -771,7 +771,9 @@ def test_plugin_system_before_workspace_builder(
771771 )
772772 workspace = loader .expand (workspace )
773773
774- builder = WorkspaceBuilder (sconf = workspace , plugins = load_plugins (workspace ))
774+ builder = WorkspaceBuilder (
775+ sconf = workspace , plugins = load_plugins (workspace ), server = session .server
776+ )
775777 assert len (builder .plugins ) > 0
776778
777779 builder .build (session = session )
@@ -786,7 +788,9 @@ def test_plugin_system_on_window_create(monkeypatch_plugin_test_packages, sessio
786788 )
787789 workspace = loader .expand (workspace )
788790
789- builder = WorkspaceBuilder (sconf = workspace , plugins = load_plugins (workspace ))
791+ builder = WorkspaceBuilder (
792+ sconf = workspace , plugins = load_plugins (workspace ), server = session .server
793+ )
790794 assert len (builder .plugins ) > 0
791795
792796 builder .build (session = session )
@@ -801,7 +805,9 @@ def test_plugin_system_after_window_finished(monkeypatch_plugin_test_packages, s
801805 )
802806 workspace = loader .expand (workspace )
803807
804- builder = WorkspaceBuilder (sconf = workspace , plugins = load_plugins (workspace ))
808+ builder = WorkspaceBuilder (
809+ sconf = workspace , plugins = load_plugins (workspace ), server = session .server
810+ )
805811 assert len (builder .plugins ) > 0
806812
807813 builder .build (session = session )
@@ -818,7 +824,9 @@ def test_plugin_system_on_window_create_multiple_windows(session):
818824 )
819825 workspace = loader .expand (workspace )
820826
821- builder = WorkspaceBuilder (sconf = workspace , plugins = load_plugins (workspace ))
827+ builder = WorkspaceBuilder (
828+ sconf = workspace , plugins = load_plugins (workspace ), server = session .server
829+ )
822830 assert len (builder .plugins ) > 0
823831
824832 builder .build (session = session )
@@ -838,7 +846,9 @@ def test_plugin_system_after_window_finished_multiple_windows(
838846 )
839847 workspace = loader .expand (workspace )
840848
841- builder = WorkspaceBuilder (sconf = workspace , plugins = load_plugins (workspace ))
849+ builder = WorkspaceBuilder (
850+ sconf = workspace , plugins = load_plugins (workspace ), server = session .server
851+ )
842852 assert len (builder .plugins ) > 0
843853
844854 builder .build (session = session )
@@ -856,7 +866,9 @@ def test_plugin_system_multiple_plugins(monkeypatch_plugin_test_packages, sessio
856866 )
857867 workspace = loader .expand (workspace )
858868
859- builder = WorkspaceBuilder (sconf = workspace , plugins = load_plugins (workspace ))
869+ builder = WorkspaceBuilder (
870+ sconf = workspace , plugins = load_plugins (workspace ), server = session .server
871+ )
860872 assert len (builder .plugins ) > 0
861873
862874 builder .build (session = session )
@@ -1245,7 +1257,7 @@ def test_first_pane_start_directory(session, tmp_path: pathlib.Path):
12451257 workspace = loader .expand (workspace )
12461258 workspace = loader .trickle (workspace )
12471259
1248- builder = WorkspaceBuilder (sconf = workspace )
1260+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
12491261 builder .build (session = session )
12501262
12511263 assert session == builder .session
@@ -1270,7 +1282,7 @@ def test_layout_main_horizontal(session):
12701282 yaml_workspace = test_utils .get_workspace_file ("workspace/builder/three_pane.yaml" )
12711283 workspace = ConfigReader ._from_file (path = yaml_workspace )
12721284
1273- builder = WorkspaceBuilder (sconf = workspace )
1285+ builder = WorkspaceBuilder (sconf = workspace , server = session . server )
12741286 builder .build (session = session )
12751287
12761288 assert session .windows
0 commit comments