326 + @inlineCallbacks
327 + def test_refresh_status(self):
328 + """Test that it receives the proper information from syncdaemon."""
329 + yield self.ui.refresh_status()
do instead:
def test_refresh_status(self):
"""Test that it receives the proper information from syncdaemon."""
return self.ui.refresh_status()
Tests can return deferreds so no need for the inlineCallbacks
The following is a personal thing, ignore it if you wish:
Some small fixes:
icon is always not None, I suppose it is icon_name
127 + icon = QtGui.QIcon() name(icon_ name) setIcon( icon) setText( text)
128 + if icon is not None:
129 + icon = icon_from_
130 + text = data.get('msg')
131 + self.status.
132 + self.status.
Possible attr error:
135 + self._backend_ method = getattr( self.backend, data['backend_ method' ])
A little cleaner way:
326 + @inlineCallbacks status( self): refresh_ status( )
327 + def test_refresh_
328 + """Test that it receives the proper information from syncdaemon."""
329 + yield self.ui.
do instead:
def test_refresh_ status( self): refresh_ status( )
"""Test that it receives the proper information from syncdaemon."""
return self.ui.
Tests can return deferreds so no need for the inlineCallbacks
The following is a personal thing, ignore it if you wish:
signal_pairs = ( status_ action, self.change_status) window) open_u1_ folder, self.open_ u1_folder_ action) get_more_ storage, self.get_ more_storage_ action) go_to_web, self.go_ to_web_ action) get_help_ online, self.get_ help_action)
(self.
(self.open_u1, self.restore_
(self.
(self.
(self.
(self.
(self.quit, self.stop)
)
for button, callback in signal_pairs: triggered. connect( callback)
button.
Instead of:
# Connect Signals action. triggered. connect( self.change_ status) u1.triggered. connect( self.restore_ window) u1_folder. triggered. connect( self.open_ u1_folder_ action) more_storage. triggered. connect( self.get_ more_storage_ action) to_web. triggered. connect( self.go_ to_web_ action) help_online. triggered. connect( self.get_ help_action) triggered. connect( self.stop)
self.status_
self.open_
self.open_
self.get_
self.go_
self.get_
self.quit.