File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed
Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 11from tkinter import *
2- from ScreenBlockerMenu import ScreenBlockerMenu
2+
3+ from forms .ScreenBlockerMenu import ScreenBlockerMenu
34
45root = Tk ()
56
File renamed without changes.
Original file line number Diff line number Diff line change 1+ import unittest
2+
3+
4+ class TimeOptionsManager (object ):
5+ def __init__ (self ):
6+ self .minutes = 10
7+ self .seconds = 0
8+
9+ def get_time_string (self ):
10+ return "{0:0>2}:00" .format (self .minutes , self .seconds )
11+
12+ def indement_minutes (self ):
13+ self .minutes += 1
14+
15+ def decriment_minutes (self ):
16+ self .minutes -= 1
17+
18+
19+ class TestsTimeOptions (unittest .TestCase ):
20+ def test_default_time_10_minutes (self ):
21+ time_options_manager = TimeOptionsManager ()
22+ result = time_options_manager .get_time_string ()
23+ self .assertEqual (result , "10:00" )
24+
25+ def test_indement_minutes_once_is_11_minutes (self ):
26+ time_options_manager = TimeOptionsManager ()
27+ time_options_manager .indement_minutes ()
28+ result = time_options_manager .get_time_string ()
29+ self .assertEqual (result , "11:00" )
30+
31+ def test_decriment_minutes_once_is_9_minutes (self ):
32+ time_options_manager = TimeOptionsManager ()
33+ time_options_manager .decriment_minutes ()
34+ result = time_options_manager .get_time_string ()
35+ self .assertEqual (result , "09:00" )
36+
37+
38+ if __name__ == '__main__' :
39+ unittest .main ()
You can’t perform that action at this time.
0 commit comments