Exemple #1
0
 def test_getRT(self):
     s = Slider(self.win, size=(1, 0.1))
     testRT = .89
     s.recordRating(2, testRT)
     assert s.history[-1][1] == s.getRT()
     assert type(s.getRT()) == float
     assert s.getRT() == testRT
Exemple #2
0
 def test_getRT(self):
     s = Slider(self.win, size=(1, 0.1))
     testRT = .89
     s.recordRating(2, testRT)
     assert s.history[-1][1] == s.getRT()
     assert type(s.getRT()) == float
     assert s.getRT() == testRT
Exemple #3
0
    def test_recordRating(self):
        s = Slider(self.win, size=(1, 0.1))
        minRating, maxRating = 1, 5

        counter = 0
        for rates in range(0, 7):
            s.recordRating(rates, random.random())
            counter += 1

        ratings = [rating[0] for rating in s.history]
        RT = [rt[1] for rt in s.history]

        assert len(s.history) == counter
        assert len(ratings) == counter
        assert min(ratings) == minRating
        assert max(ratings) == maxRating
        assert len(RT) == counter
        assert max(RT) <= 1
        assert min(RT) >= 0
Exemple #4
0
    def test_recordRating(self):
        s = Slider(self.win, size=(1, 0.1))
        minRating, maxRating = 1, 5

        counter = 0
        for rates in range(0,7):
            s.recordRating(rates, random.random())
            counter +=1

        ratings = [rating[0] for rating in s.history]
        RT = [rt[1] for rt in s.history]

        assert len(s.history) == counter
        assert len(ratings) == counter
        assert min(ratings) == minRating
        assert max(ratings) == maxRating
        assert len(RT) == counter
        assert max(RT) <= 1
        assert min(RT) >= 0