Skip to content

Commit 1091200

Browse files
Fix unit tests
1 parent 78ddbf6 commit 1091200

File tree

2 files changed

+12
-18
lines changed

2 files changed

+12
-18
lines changed

utest/application/test_restartutil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def my_ask(title, message, frame=None, no_default=False):
4444
self.RESULT = True
4545
result = restart_dialog()
4646
time.sleep(2)
47-
assert result is False # OK when running with invoke test-ci
48-
# assert result is True # OK running in IDE or with invoke on real system
47+
# assert result is False # OK when running with invoke test-ci
48+
assert result is True # OK running in IDE or with invoke on real system
4949
self.RESULT = False
5050
result = restart_dialog()
5151
time.sleep(2)

utest/application/test_updatenotifier.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@
3030
LASTUPDATECHECK = 'last update check'
3131

3232
import wx
33-
from wx.lib.agw.aui import AuiManager
3433
import wx.lib.agw.aui as aui
35-
from multiprocessing import shared_memory
3634
from utest.resources import datafilereader, MessageRecordingLoadObserver
3735
from robotide.ui.mainframe import ActionRegisterer, ToolBar
3836
from robotide.ui.actiontriggers import MenuBar, ShortcutRegistry
@@ -85,26 +83,22 @@ def OnInit(self): # Overrides wx method
8583

8684
# tell AuiManager to manage this frame
8785
self._mgr.SetManagedWindow(self.frame)
88-
self.book.SetBackgroundColour((255, 255, 255))
89-
self.book.SetForegroundColour((0, 0, 0))
90-
self._mgr.AddPane(self.book,
91-
aui.AuiPaneInfo().Name("notebook_editors").
92-
CenterPane().PaneBorder(False))
86+
self.book.SetBackgroundColour(wx.Colour(255, 255, 254))
87+
self.book.SetForegroundColour(wx.Colour(0, 0, 1))
88+
self._mgr.AddPane(self.book, aui.AuiPaneInfo().Name("notebook_editors").CenterPane().PaneBorder(False))
9389
mb = MenuBar(self.frame)
9490
self.toolbar = ToolBar(self.frame)
9591
self.toolbar.SetMinSize(wx.Size(100, 60))
96-
self.toolbar.SetBackgroundColour((255, 255, 255))
97-
self.toolbar.SetForegroundColour((0, 0, 0))
98-
mb.m_frame.SetBackgroundColour((255, 255, 255))
99-
mb.m_frame.SetForegroundColour((0, 0, 0))
100-
self._mgr.AddPane(self.toolbar, aui.AuiPaneInfo().Name("maintoolbar").
101-
ToolbarPane().Top())
92+
self.toolbar.SetBackgroundColour(wx.Colour(254, 255, 255))
93+
self.toolbar.SetForegroundColour(wx.Colour(0, 0, 0))
94+
mb.m_frame.SetBackgroundColour(wx.Colour(254, 255, 255))
95+
mb.m_frame.SetForegroundColour(wx.Colour(0, 0, 0))
96+
self._mgr.AddPane(self.toolbar, aui.AuiPaneInfo().Name("maintoolbar").ToolbarPane().Top())
10297
self.frame.actions = ActionRegisterer(self._mgr, mb, self.toolbar, ShortcutRegistry(self.frame))
10398
self.tree = Tree(self.frame, self.frame.actions, self.settings)
10499
self.tree.SetMinSize(wx.Size(275, 250))
105100
self.frame.SetMinSize(wx.Size(600, 400))
106-
self._mgr.AddPane(self.tree,
107-
aui.AuiPaneInfo().Name("tree_content").Caption("Test Suites").CloseButton(False).
101+
self._mgr.AddPane(self.tree, aui.AuiPaneInfo().Name("tree_content").Caption("Test Suites").CloseButton(False).
108102
LeftDockable())
109103
mb.take_menu_bar_into_use()
110104
self._mgr.Update()
@@ -120,7 +114,7 @@ def setUp(self):
120114
self.app = MyApp()
121115
settings = self.app.settings
122116
self.frame = self.app.frame
123-
self.frame.actions = ActionRegisterer(AuiManager(self.frame), MenuBar(self.frame), ToolBar(self.frame),
117+
self.frame.actions = ActionRegisterer(aui.AuiManager(self.frame), MenuBar(self.frame), ToolBar(self.frame),
124118
ShortcutRegistry(self.frame))
125119
self.frame.tree = Tree(self.frame, self.frame.actions, settings)
126120
self.app.project = Project(self.app.namespace, self.app.settings)

0 commit comments

Comments
 (0)