Skip to content

Commit 67909af

Browse files
committed
1
1 parent f1e7c53 commit 67909af

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

tests-qt/test_systemtray.py

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def mock_dependencies():
182182
mock_watcher_instance.fileChanged.connect = MagicMock()
183183
mock_watcher_instance.addPath = MagicMock()
184184
mock_watcher.return_value = mock_watcher_instance
185-
185+
186186
yield {
187187
'load_ui': mock_load_ui,
188188
'api_vacuum': mock_api_vacuum,
@@ -333,17 +333,6 @@ def test_pause_functionality(qtbot, mock_dependencies):
333333
assert hasattr(tray, 'unpause')
334334

335335

336-
def test_file_system_watcher_setup(qtbot, mock_dependencies):
337-
''' Test that file system watcher is set up correctly '''
338-
tray = nowplaying.systemtray.Tray()
339-
# Note: QSystemTrayIcon is not a QWidget, so we can't add it to qtbot
340-
341-
# After full initialization, watcher should be set up
342-
# This is called in the init continuation after UI setup
343-
# Note: watcher may not be set up in test environment
344-
# Either state is valid in tests - watcher may or may not be set up
345-
assert hasattr(tray, 'watcher') or not hasattr(tray, 'watcher')
346-
347336

348337
def test_track_notification_system(qtbot, mock_dependencies):
349338
''' Test track notification functionality '''
@@ -460,13 +449,13 @@ def test_file_system_watcher_setup(qtbot, mock_dependencies):
460449

461450
# Verify that the mock watcher was instantiated
462451
mock_dependencies['mock_watcher'].assert_called_once()
463-
452+
464453
# Verify that the mock watcher's addPath was called
465454
mock_dependencies['mock_watcher_instance'].addPath.assert_called_once()
466-
455+
467456
# Verify that the mock watcher's fileChanged signal was connected
468457
mock_dependencies['mock_watcher_instance'].fileChanged.connect.assert_called_once()
469-
458+
470459
# The watcher should be set on the tray instance
471460
assert tray.watcher is not None
472461
assert tray.watcher == mock_dependencies['mock_watcher_instance']

0 commit comments

Comments
 (0)