|
99 | 99 | app.settings = FakeSettings() |
100 | 100 | app.register_editor() |
101 | 101 | """ |
| 102 | +generic_app = wx.App() |
102 | 103 |
|
103 | 104 | DATA = [['kw1', '', ''], |
104 | 105 | ['kw2', 'arg1', ''], |
@@ -346,7 +347,7 @@ def test_on_comment_cells(self): |
346 | 347 | self._grid.kweditor.on_comment_cells(None) # THIS IS NOT WORKING |
347 | 348 | data = self._grid.kweditor.get_selected_content() |
348 | 349 | print(f"DEBUG: After Sharp Comment Data Cell is {data}") |
349 | | - # wx.CallLater(5000, self.app.ExitMainLoop) |
| 350 | + wx.CallLater(5000, self.app.ExitMainLoop) |
350 | 351 | # self.app.MainLoop() |
351 | 352 |
|
352 | 353 |
|
@@ -572,7 +573,37 @@ def test_htmlpopupwindow_dialog_title(self): |
572 | 573 | print(f"DEBUG: test_z_kweditor.py: test_htmlpopupwindow_dialog_title title={title}") |
573 | 574 | # wx.CallLater(4000, dlg.hide) |
574 | 575 | # Uncomment next lines if you want to see the app |
575 | | - # wx.CallLater(5000, self.app.ExitMainLoop) |
| 576 | + wx.CallLater(5000, self.app.ExitMainLoop) |
| 577 | + # self.app.MainLoop() |
| 578 | + |
| 579 | + def test_htmlpopupwindow_dialog_simple(self): |
| 580 | + dlg = HtmlPopupWindow(self.frame, (400, 200), False, True) |
| 581 | + dlg.set_content("Example without title") |
| 582 | + dlg.show_at((1000, 200)) |
| 583 | + shown=dlg.IsShown() |
| 584 | + print(f"DEBUG: test_z_kweditor.py: test_htmlpopupwindow_dialog_simple shown={shown}") |
| 585 | + assert shown is True |
| 586 | + wx.CallLater(4000, dlg.hide) |
| 587 | + # Uncomment next lines if you want to see the app |
| 588 | + wx.CallLater(5000, self.app.ExitMainLoop) |
| 589 | + # self.app.MainLoop() |
| 590 | + |
| 591 | + def test_htmlpopupwindow_dialog_title(self): |
| 592 | + dlg = HtmlPopupWindow(self.panel, (400, 200), True, True) |
| 593 | + dlg.set_content("Example with title", "This is the Title") |
| 594 | + dlg.show_at((1000, 100)) |
| 595 | + shown=dlg.IsShown() |
| 596 | + assert shown is True |
| 597 | + pw_size = dlg.pw_size |
| 598 | + pw_pos = dlg.screen_position |
| 599 | + print(f"DEBUG: test_z_kweditor.py: test_htmlpopupwindow_dialog_title pw_size={pw_size} scree_pos={pw_pos}") |
| 600 | + event=wx.KeyEvent() |
| 601 | + dlg._detach(event) |
| 602 | + title = dlg._detached_title |
| 603 | + print(f"DEBUG: test_z_kweditor.py: test_htmlpopupwindow_dialog_title title={title}") |
| 604 | + wx.CallLater(4000, dlg.hide) |
| 605 | + # Uncomment next lines if you want to see the app |
| 606 | + wx.CallLater(5000, self.app.ExitMainLoop) |
576 | 607 | # self.app.MainLoop() |
577 | 608 |
|
578 | 609 | def test_contentassist_text_editor(self): |
|
0 commit comments