File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,11 +95,6 @@ def _detect_active_window_class() -> Optional[str]:
9595 return window_class or None
9696
9797
98- def _is_terminal_active () -> bool :
99- window_class = _detect_active_window_class ()
100- return bool (window_class and window_class in _KNOWN_TERMINAL_WINDOW_CLASSES )
101-
102-
10398class PasteServiceError (Exception ):
10499 """Raised when clipboard write or key injection fails hard."""
105100
Original file line number Diff line number Diff line change 1515 PasteService ,
1616 PasteServiceError ,
1717 _detect_active_window_class ,
18- _is_terminal_active ,
1918)
2019
2120
@@ -81,20 +80,6 @@ def test_returns_none_if_display_not_set(self):
8180 run_mock .assert_not_called ()
8281
8382
84- class TestIsTerminalActive :
85- def test_returns_true_for_terminal_window (self ):
86- with patch ("app.paste_service._detect_active_window_class" , return_value = "konsole" ):
87- assert _is_terminal_active () is True
88-
89- def test_returns_false_for_non_terminal_window (self ):
90- with patch ("app.paste_service._detect_active_window_class" , return_value = "firefox" ):
91- assert _is_terminal_active () is False
92-
93- def test_returns_false_when_detection_is_none (self ):
94- with patch ("app.paste_service._detect_active_window_class" , return_value = None ):
95- assert _is_terminal_active () is False
96-
97-
9883class TestYdotoolPaste :
9984 def test_sends_ctrl_shift_v_when_terminal_active (self ):
10085 service = PasteService (autopaste = True , key_delay_ms = 135 )
You can’t perform that action at this time.
0 commit comments