@@ -32,10 +32,10 @@ class TrailingOutputFixture(t.NamedTuple):
3232
3333
3434class AttachFixture (t .NamedTuple ):
35- """Fixture for attach_to behaviours."""
35+ """Fixture for control_session behaviours."""
3636
3737 test_id : str
38- attach_to : str
38+ control_session : str
3939 expect_attached : bool
4040 expect_notification : bool = False
4141
@@ -779,31 +779,31 @@ def test_internal_session_name_collision(case: InternalNameCollisionFixture) ->
779779 [
780780 AttachFixture (
781781 test_id = "attach_existing" ,
782- attach_to = "shared_session" ,
782+ control_session = "shared_session" ,
783783 expect_attached = True ,
784784 expect_notification = True ,
785785 ),
786786 AttachFixture (
787787 test_id = "attach_missing" ,
788- attach_to = "missing_session" ,
788+ control_session = "missing_session" ,
789789 expect_attached = False ,
790790 ),
791791 ],
792792 ids = lambda c : c .test_id ,
793793)
794- def test_attach_to_existing_session (case : AttachFixture ) -> None :
795- """Control mode attach_to should not create/hide a management session."""
794+ def test_control_session_existing (case : AttachFixture ) -> None :
795+ """Control mode control_session should not create/hide a management session."""
796796 socket_name = f"libtmux_test_{ uuid .uuid4 ().hex [:8 ]} "
797797 bootstrap = Server (socket_name = socket_name )
798798 try :
799799 if case .expect_attached :
800800 # Create the target session via subprocess engine
801801 bootstrap .new_session (
802- session_name = case .attach_to ,
802+ session_name = case .control_session ,
803803 attach = False ,
804804 kill_session = True ,
805805 )
806- engine = ControlModeEngine (attach_to = case .attach_to )
806+ engine = ControlModeEngine (control_session = case .control_session )
807807 server = Server (socket_name = socket_name , engine = engine )
808808 if not case .expect_attached :
809809 with pytest .raises (exc .ControlModeConnectionError ):
@@ -812,7 +812,7 @@ def test_attach_to_existing_session(case: AttachFixture) -> None:
812812
813813 sessions = server .sessions
814814 assert len (sessions ) == 1
815- assert sessions [0 ].session_name == case .attach_to
815+ assert sessions [0 ].session_name == case .control_session
816816
817817 # Only the control client is attached; attached_sessions should be empty
818818 # because we filter control clients from "attached" semantics.
@@ -823,7 +823,7 @@ def test_attach_to_existing_session(case: AttachFixture) -> None:
823823 # Drain notifications to confirm control stream is flowing.
824824 notif = next (server .engine .iter_notifications (timeout = 0.5 ), None )
825825 if notif is None :
826- pytest .xfail ("attach_to did not emit notification within timeout" )
826+ pytest .xfail ("control_session did not emit notification within timeout" )
827827 finally :
828828 with contextlib .suppress (Exception ):
829829 bootstrap .kill ()
@@ -863,25 +863,25 @@ def test_list_clients_control_flag_filters_attached() -> None:
863863
864864
865865@pytest .mark .engines (["control" ])
866- def test_attach_to_can_drain_notifications () -> None :
867- """drain_notifications() provides explicit sync point for attach_to notifications.
866+ def test_control_session_can_drain_notifications () -> None :
867+ """drain_notifications() provides explicit sync for control_session notifications.
868868
869- When using attach_to mode, the control client may receive many notifications
870- from pane output. The drain_notifications() helper waits until the notification
871- queue is idle, providing a deterministic sync point.
869+ When using control_session mode, the control client may receive many
870+ notifications from pane output. The drain_notifications() helper waits until
871+ the notification queue is idle, providing a deterministic sync point.
872872 """
873873 socket_name = f"libtmux_test_{ uuid .uuid4 ().hex [:8 ]} "
874874 bootstrap = Server (socket_name = socket_name )
875875 try :
876- # Create a session for attach_to to connect to
876+ # Create a session for control_session to connect to
877877 bootstrap .new_session (
878878 session_name = "drain_test" ,
879879 attach = False ,
880880 kill_session = True ,
881881 )
882882
883883 # Control mode will attach to existing session
884- engine = ControlModeEngine (attach_to = "drain_test" )
884+ engine = ControlModeEngine (control_session = "drain_test" )
885885 server = Server (socket_name = socket_name , engine = engine )
886886
887887 # Start the engine by accessing sessions
0 commit comments