@@ -413,7 +413,7 @@ def store_silent_updates(hwnd, lParam):
413413 ctypes .windll .user32 .GetWindowTextW (hwnd , buff , length + 1 )
414414
415415 if curr_class .value == u'#32770' :
416- print (curr_class .value )
416+ #FOR_DEBUGGING print(curr_class.value)
417417 ctypes .windll .user32 .SendMessageW (hwnd ,WM_COMMAND , IDC_CHECK_UPDATESILENTLY , 0 )
418418 return True # let enumeration continue as it is unclear if the right sub dlg was found
419419
@@ -652,7 +652,7 @@ def store_auto_updater(hwnd, lParam):
652652 ctypes .windll .user32 .GetWindowTextW (hwnd , buff , length + 1 )
653653
654654 if curr_class .value == u'#32770' :
655- #print(curr_class.value)
655+ #FOR_DEBUGGING print(curr_class.value)
656656 ctypes .windll .user32 .SendMessageW (hwnd ,WM_COMMAND , IDC_CHECK_AUTOUPDATE , 0 )
657657 return True # let enumeration continue as it is unclear if the right sub dlg was found
658658
@@ -1340,19 +1340,16 @@ def test_saveFile(self):
13401340 notepad .open (tmpfile )
13411341 text_to_be_saved = 'example_text'
13421342 editor .addText (text_to_be_saved )
1343- with open (tmpfile , 'r' ) as f :
1344- _content = f .read ()
1345-
1346- self .assertEqual (_content , '' )
1343+ self .check_file_contents (tmpfile , '' )
13471344
13481345 notepad .saveFile (tmpfile )
1349- # TODO moved here from below, because otherwise with N++ 7.8.6 the _content is still empty
1350- # TODO on reading below from python/filesystem, seems to be a N++ issue, which needs further investigation
1351- notepad .close ()
1352- with open (tmpfile , 'r' ) as f :
1353- _content = f .read ()
1346+ # N++ doesn't save with saveFile(), therefore saveAs() is called additionally
1347+ # to make this testcase working
1348+ notepad .saveAs (tmpfile )
13541349
1355- self .assertEqual (_content , text_to_be_saved )
1350+ self .check_file_contents (tmpfile , text_to_be_saved )
1351+
1352+ notepad .close ()
13561353
13571354
13581355 def test_setEditorBorderEdge (self ):
@@ -1480,7 +1477,7 @@ def start_monitor():
14801477
14811478 menu_handle = ctypes .windll .user32 .SendMessageW (tabbar_context_menu_hwnd , MN_GETHMENU , 0 , 0 )
14821479 item_count = ctypes .windll .user32 .GetMenuItemCount (menu_handle )
1483- self .assertEqual (item_count , 29 , msg = u'Expected 29 menu items but received:{}' .format (item_count ))
1480+ self .assertEqual (item_count , 16 , msg = u'Expected 16 menu items but received:{}' .format (item_count ))
14841481 ctypes .windll .user32 .SendMessageW (tabbar_context_menu_hwnd , WM_CLOSE , 0 , 0 )
14851482
14861483 timer = Timer (1 , start_monitor )
0 commit comments