@@ -182,7 +182,7 @@ def mock_dependencies():
182
182
mock_watcher_instance .fileChanged .connect = MagicMock ()
183
183
mock_watcher_instance .addPath = MagicMock ()
184
184
mock_watcher .return_value = mock_watcher_instance
185
-
185
+
186
186
yield {
187
187
'load_ui' : mock_load_ui ,
188
188
'api_vacuum' : mock_api_vacuum ,
@@ -333,17 +333,6 @@ def test_pause_functionality(qtbot, mock_dependencies):
333
333
assert hasattr (tray , 'unpause' )
334
334
335
335
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
-
347
336
348
337
def test_track_notification_system (qtbot , mock_dependencies ):
349
338
''' Test track notification functionality '''
@@ -460,13 +449,13 @@ def test_file_system_watcher_setup(qtbot, mock_dependencies):
460
449
461
450
# Verify that the mock watcher was instantiated
462
451
mock_dependencies ['mock_watcher' ].assert_called_once ()
463
-
452
+
464
453
# Verify that the mock watcher's addPath was called
465
454
mock_dependencies ['mock_watcher_instance' ].addPath .assert_called_once ()
466
-
455
+
467
456
# Verify that the mock watcher's fileChanged signal was connected
468
457
mock_dependencies ['mock_watcher_instance' ].fileChanged .connect .assert_called_once ()
469
-
458
+
470
459
# The watcher should be set on the tray instance
471
460
assert tray .watcher is not None
472
461
assert tray .watcher == mock_dependencies ['mock_watcher_instance' ]
0 commit comments