示例#1
0
 def test_getRating(self):
     s = Slider(self.win, size=(1, 0.1))
     minRating, maxRating = 1, 5
     s.rating = 1
     assert s.getRating() == minRating
     s.rating = 5
     assert s.getRating() == maxRating
     s.rating = 0
     assert s.getRating() == minRating
     s.rating = 6
     assert s.getRating() == maxRating
示例#2
0
 def test_getRating(self):
     s = Slider(self.win, size=(1, 0.1))
     minRating, maxRating = 1, 5
     s.rating = 1
     assert s.getRating() == minRating
     s.rating = 5
     assert s.getRating() == maxRating
     s.rating = 0
     assert s.getRating() == minRating
     s.rating = 6
     assert s.getRating() == maxRating
示例#3
0
 def test_reset(self):
     s = Slider(self.win, size=(1, 0.1))
     s.markerPos = 1
     s.history = [1]
     s.rating = 1
     s.rt = 1
     s.status = constants.STARTED
     s.reset()
     assert s.markerPos == None
     assert s.history == []
     assert s.rating == None
     assert s.rt == None
     assert s.status == constants.NOT_STARTED
示例#4
0
 def test_reset(self):
     s = Slider(self.win, size=(1, 0.1))
     s.markerPos = 1
     s.history = [1]
     s.rating = 1
     s.rt = 1
     s.status = constants.STARTED
     s.reset()
     assert s.markerPos == None
     assert s.history == []
     assert s.rating == None
     assert s.rt == None
     assert s.status == constants.NOT_STARTED