Exemplo n.º 1
0
 def test_alarmMin(self):
     from controller import SetAlarmPopup
     from model import alarmModel
     myAlarm = alarmModel()
     alarm = SetAlarmPopup()
     four = Button(text='04')
     fortyFive = Button(text='45')
     alarmPopup = Popup()
     alarm.dismissAlarmPopup(alarmPopup, four, fortyFive, 0)
     self.assertEqual(myAlarm.getWakeMin(), 45)
Exemplo n.º 2
0
 def test_sleepMin(self):
     from controller import SetSleepPopup
     from model import alarmModel
     myAlarm = alarmModel()
     sleep = SetSleepPopup()
     four = Button(text='04')
     fortyFive = Button(text='45')
     sleepPopup = Popup()
     sleep.dismissSleepPopup(sleepPopup, four, fortyFive, 0)
     self.assertEqual(myAlarm.getSleepMin(), 45)
Exemplo n.º 3
0
import time
import datetime
import subprocess
from model import clockModel
from model import alarmModel
#uncomment to run lights on the pi
#import board
#import neopixel

Builder.load_file('clockHomeView.kv')
Builder.load_file('alarmScreen.kv')
Builder.load_file('lights.kv')
Builder.load_file('colorLights.kv')
Builder.load_file('settingScreen.kv')

myAlarm = alarmModel()

alarm_hour = 0
alarm_minute = 0
sleep_hour = 0
sleep_minute = 0
alarm_changed = 0
wait_next_sminute = 0
wait_next_minute = 0
myColor = [0, 0, 1, 1]
clr_picker = ColorPicker()


class HomeScreen(Screen):
    pass