Merge lp:~nskaggs/ubuntu-clock-app/new-pep8-fixes into lp:ubuntu-clock-app/saucy

Proposed by Nicholas Skaggs
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 447
Merged at revision: 446
Proposed branch: lp:~nskaggs/ubuntu-clock-app/new-pep8-fixes
Merge into: lp:ubuntu-clock-app/saucy
Diff against target: 222 lines (+25/-9)
6 files modified
tests/autopilot/ubuntu_clock_app/emulators.py (+16/-5)
tests/autopilot/ubuntu_clock_app/tests/__init__.py (+2/-2)
tests/autopilot/ubuntu_clock_app/tests/test_alarm.py (+4/-2)
tests/autopilot/ubuntu_clock_app/tests/test_clock.py (+1/-0)
tests/autopilot/ubuntu_clock_app/tests/test_stopwatch.py (+1/-0)
tests/autopilot/ubuntu_clock_app/tests/test_timer.py (+1/-0)
To merge this branch: bzr merge lp:~nskaggs/ubuntu-clock-app/new-pep8-fixes
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Julia Palandri (community) Approve
Review via email: mp+224853@code.launchpad.net

Commit message

Fixes for new pep8 requirements

Description of the change

Fixes for new pep8 requirements

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Julia Palandri (julia-palandri) wrote :

LGTM

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tests/autopilot/ubuntu_clock_app/emulators.py'
--- tests/autopilot/ubuntu_clock_app/emulators.py 2014-05-23 07:12:00 +0000
+++ tests/autopilot/ubuntu_clock_app/emulators.py 2014-06-27 15:22:25 +0000
@@ -30,6 +30,7 @@
3030
3131
32class ClockEmulatorException(toolkit_emulators.ToolkitEmulatorException):32class ClockEmulatorException(toolkit_emulators.ToolkitEmulatorException):
33
33 """Exception raised when there is an error with the emulator."""34 """Exception raised when there is an error with the emulator."""
3435
3536
@@ -76,10 +77,12 @@
7677
7778
78class LabelDots(toolkit_emulators.TextField):79class LabelDots(toolkit_emulators.TextField):
80
79 """Autopilot helper for the LabelDots component."""81 """Autopilot helper for the LabelDots component."""
8082
8183
82class Page(toolkit_emulators.UbuntuUIToolkitEmulatorBase):84class Page(toolkit_emulators.UbuntuUIToolkitEmulatorBase):
85
83 """Autopilot helper for Pages."""86 """Autopilot helper for Pages."""
8487
85 def __init__(self, *args):88 def __init__(self, *args):
@@ -120,6 +123,7 @@
120123
121124
122class ClockPage(Page):125class ClockPage(Page):
126
123 """Autopilot helper for the Clock page."""127 """Autopilot helper for the Clock page."""
124128
125 def is_12_hour_time(self):129 def is_12_hour_time(self):
@@ -242,6 +246,7 @@
242246
243247
244class WorldClock(toolkit_emulators.UbuntuUIToolkitEmulatorBase):248class WorldClock(toolkit_emulators.UbuntuUIToolkitEmulatorBase):
249
245 """Autopilot helper for the World Clock Page"""250 """Autopilot helper for the World Clock Page"""
246251
247 def click_world_city(self, index):252 def click_world_city(self, index):
@@ -256,6 +261,7 @@
256261
257262
258class SettingsPage(object):263class SettingsPage(object):
264
259 """Autopilot helper for the Settings page."""265 """Autopilot helper for the Settings page."""
260266
261 def __init__(self, proxy_object):267 def __init__(self, proxy_object):
@@ -290,6 +296,7 @@
290296
291297
292class StopwatchPage(Page):298class StopwatchPage(Page):
299
293 """Autopilot helper for the Stopwatch page."""300 """Autopilot helper for the Stopwatch page."""
294301
295 def get_stopwatch_time(self):302 def get_stopwatch_time(self):
@@ -362,6 +369,7 @@
362369
363370
364class AlarmPage(Page):371class AlarmPage(Page):
372
365 """Autopilot helper for the Alarm page."""373 """Autopilot helper for the Alarm page."""
366374
367 def get_num_of_alarms(self):375 def get_num_of_alarms(self):
@@ -478,12 +486,12 @@
478 'Label', objectName='listAlarmSubtitle{}'.format(index)).text486 'Label', objectName='listAlarmSubtitle{}'.format(index)).text
479 # TODO we haven't implemented the alarm time check.487 # TODO we haven't implemented the alarm time check.
480 # --elopio - 2014-02-27488 # --elopio - 2014-02-27
481 #time = self.select_single(489 # time = self.select_single(
482 # 'Label', objectName='listAlarmTime{}'.format(index)).text490 # 'Label', objectName='listAlarmTime{}'.format(index)).text
483491
484 # TODO: Check the alarm enabled status once the bug at492 # TODO: Check the alarm enabled status once the bug at
485 # http://pad.lv/1272337 is resolved493 # http://pad.lv/1272337 is resolved
486 #enabled = self.select_single(494 # enabled = self.select_single(
487 # toolkit_emulators.CheckBox,495 # toolkit_emulators.CheckBox,
488 # objectName='listAlarmStatus{}'.format(index)).checked496 # objectName='listAlarmStatus{}'.format(index)).checked
489 alarms.append((name, recurrence))497 alarms.append((name, recurrence))
@@ -491,6 +499,7 @@
491499
492500
493class AddAlarmPage(Page):501class AddAlarmPage(Page):
502
494 """Autopilot helper for the Add Alarm page."""503 """Autopilot helper for the Add Alarm page."""
495504
496 @autopilot_logging.log_action(logger.info)505 @autopilot_logging.log_action(logger.info)
@@ -614,6 +623,7 @@
614623
615624
616class AlarmDays(toolkit_emulators.UbuntuUIToolkitEmulatorBase):625class AlarmDays(toolkit_emulators.UbuntuUIToolkitEmulatorBase):
626
617 """Autopilot helper for the Alarm Days dialog."""627 """Autopilot helper for the Alarm Days dialog."""
618628
619 @autopilot_logging.log_action(logger.info)629 @autopilot_logging.log_action(logger.info)
@@ -657,6 +667,7 @@
657667
658668
659class TimerPage(Page):669class TimerPage(Page):
670
660 """Autopilot helper for the Timer page."""671 """Autopilot helper for the Timer page."""
661672
662 def get_num_of_presets(self):673 def get_num_of_presets(self):
@@ -710,7 +721,7 @@
710721
711 timeout = 0722 timeout = 0
712 timer_face = self.select_single('TimerFace')723 timer_face = self.select_single('TimerFace')
713 #need to select clock in order to set time724 # need to select clock in order to set time
714 while not timer_face.focus and timeout < 10:725 while not timer_face.focus and timeout < 10:
715 logger.debug('Timerlabel loop')726 logger.debug('Timerlabel loop')
716 self._click_timer_label()727 self._click_timer_label()
@@ -720,7 +731,7 @@
720 # TODO we need a dialer hand emulator, with proper self-tests.731 # TODO we need a dialer hand emulator, with proper self-tests.
721 # --elopio -2014-01-31732 # --elopio -2014-01-31
722 minute = self._get_timer_minute_hand()733 minute = self._get_timer_minute_hand()
723 #make sure timer is set734 # make sure timer is set
724 x, y, w, h = minute.globalRect735 x, y, w, h = minute.globalRect
725 tx = x + (w / 2)736 tx = x + (w / 2)
726 ty = y + (h / 2.5)737 ty = y + (h / 2.5)
@@ -728,7 +739,7 @@
728 reset_button = self._get_timer_reset_button()739 reset_button = self._get_timer_reset_button()
729 logger.debug('reset_button %s' % reset_button.visible)740 logger.debug('reset_button %s' % reset_button.visible)
730741
731 #Try again if we failed at first742 # Try again if we failed at first
732 while not reset_button.visible and timeout < 10:743 while not reset_button.visible and timeout < 10:
733 logger.debug('Dragging minute hand')744 logger.debug('Dragging minute hand')
734 self.pointing_device.drag(745 self.pointing_device.drag(
735746
=== modified file 'tests/autopilot/ubuntu_clock_app/tests/__init__.py'
--- tests/autopilot/ubuntu_clock_app/tests/__init__.py 2014-02-27 21:29:18 +0000
+++ tests/autopilot/ubuntu_clock_app/tests/__init__.py 2014-06-27 15:22:25 +0000
@@ -52,11 +52,11 @@
52 super(ClockAppTestCase, self).setUp()52 super(ClockAppTestCase, self).setUp()
53 self.pointing_device = input.Pointer(self.input_device_class.create())53 self.pointing_device = input.Pointer(self.input_device_class.create())
5454
55 #backup and wipe db's before testing55 # backup and wipe db's before testing
56 self.temp_move_sqlite_db()56 self.temp_move_sqlite_db()
57 self.addCleanup(self.restore_sqlite_db)57 self.addCleanup(self.restore_sqlite_db)
5858
59 #turn off the OSK so it doesn't block screen elements59 # turn off the OSK so it doesn't block screen elements
60 if model() != 'Desktop':60 if model() != 'Desktop':
61 os.system("stop maliit-server")61 os.system("stop maliit-server")
62 self.addCleanup(os.system, "start maliit-server")62 self.addCleanup(os.system, "start maliit-server")
6363
=== modified file 'tests/autopilot/ubuntu_clock_app/tests/test_alarm.py'
--- tests/autopilot/ubuntu_clock_app/tests/test_alarm.py 2014-05-19 15:11:41 +0000
+++ tests/autopilot/ubuntu_clock_app/tests/test_alarm.py 2014-06-27 15:22:25 +0000
@@ -30,6 +30,7 @@
3030
3131
32class TestAlarm(ClockAppTestCase):32class TestAlarm(ClockAppTestCase):
33
33 """Tests the alarm page features"""34 """Tests the alarm page features"""
3435
35 def setUp(self):36 def setUp(self):
@@ -62,7 +63,7 @@
62 expected_recurrence = 'Once on {}'.format(tomorrow.strftime('%a'))63 expected_recurrence = 'Once on {}'.format(tomorrow.strftime('%a'))
63 # TODO: Check the alarm enabled status once the bug at64 # TODO: Check the alarm enabled status once the bug at
64 # http://pad.lv/1272337 is resolved65 # http://pad.lv/1272337 is resolved
65 #expected_enabled_value = True66 # expected_enabled_value = True
66 expected_alarm_info = (67 expected_alarm_info = (
67 test_alarm_name, expected_recurrence)68 test_alarm_name, expected_recurrence)
6869
@@ -113,6 +114,7 @@
113114
114115
115class TestRecurringAlarm(ClockAppTestCase):116class TestRecurringAlarm(ClockAppTestCase):
117
116 """Tests the recurring alarm creation"""118 """Tests the recurring alarm creation"""
117119
118 scenarios = [120 scenarios = [
@@ -159,7 +161,7 @@
159 # XXX this will be affected by the locale. --elopio - 2014-02-27161 # XXX this will be affected by the locale. --elopio - 2014-02-27
160 # TODO: Check the alarm enabled status once the bug at162 # TODO: Check the alarm enabled status once the bug at
161 # http://pad.lv/1272337 is resolved163 # http://pad.lv/1272337 is resolved
162 #expected_alarm_status = True164 # expected_alarm_status = True
163 expected_alarm_info = (165 expected_alarm_info = (
164 self.alarm_name, self.expected_recurrence)166 self.alarm_name, self.expected_recurrence)
165167
166168
=== modified file 'tests/autopilot/ubuntu_clock_app/tests/test_clock.py'
--- tests/autopilot/ubuntu_clock_app/tests/test_clock.py 2014-03-07 21:56:51 +0000
+++ tests/autopilot/ubuntu_clock_app/tests/test_clock.py 2014-06-27 15:22:25 +0000
@@ -30,6 +30,7 @@
3030
3131
32class TestClock(ClockAppTestCase):32class TestClock(ClockAppTestCase):
33
33 """Test the clock page features."""34 """Test the clock page features."""
3435
35 def setUp(self):36 def setUp(self):
3637
=== modified file 'tests/autopilot/ubuntu_clock_app/tests/test_stopwatch.py'
--- tests/autopilot/ubuntu_clock_app/tests/test_stopwatch.py 2014-03-07 17:14:33 +0000
+++ tests/autopilot/ubuntu_clock_app/tests/test_stopwatch.py 2014-06-27 15:22:25 +0000
@@ -28,6 +28,7 @@
2828
2929
30class TestStopwatch(ClockAppTestCase):30class TestStopwatch(ClockAppTestCase):
31
31 """Tests the stopwatch page features"""32 """Tests the stopwatch page features"""
3233
33 def setUp(self):34 def setUp(self):
3435
=== modified file 'tests/autopilot/ubuntu_clock_app/tests/test_timer.py'
--- tests/autopilot/ubuntu_clock_app/tests/test_timer.py 2014-03-06 23:24:54 +0000
+++ tests/autopilot/ubuntu_clock_app/tests/test_timer.py 2014-06-27 15:22:25 +0000
@@ -31,6 +31,7 @@
3131
3232
33class TestTimer(ClockAppTestCase):33class TestTimer(ClockAppTestCase):
34
34 """Tests the timer page features"""35 """Tests the timer page features"""
3536
36 def setUp(self):37 def setUp(self):

Subscribers

People subscribed via source and target branches