def test_average_3 (self) :
		cache = {1: 0.1, 2: 0.1, 3: 0.1}
		avg = netflix_average_rating(cache)
		actual = (0.1 + 0.1 + 0.1)/3
		
		self.assert_(type(avg) is float)
		self.assert_(actual == avg)
	def test_average_2 (self) :
		cache = {1: 2.3, 2: 3.2, 3: 1.5, 4: 4.1, 5: 3.7, 6: 1.1}
		avg = netflix_average_rating(cache)
		actual = (2.3 + 3.2 + 1.5 + 4.1 + 3.7 + 1.1)/6
		
		self.assert_(type(avg) is float)
		self.assert_(actual == avg)
	def test_average_1 (self) :
		cache = {1: 2.334, 2: 3.324, 3: 1.443}
		avg = netflix_average_rating(cache)
		actual = (2.334 + 3.324 + 1.443)/3
		
		self.assert_(type(avg) is float)
		self.assert_(actual == avg)
Beispiel #4
0
    def test_average_3(self):
        cache = {1: 0.1, 2: 0.1, 3: 0.1}
        avg = netflix_average_rating(cache)
        actual = (0.1 + 0.1 + 0.1) / 3

        self.assert_(type(avg) is float)
        self.assert_(actual == avg)
Beispiel #5
0
    def test_average_2(self):
        cache = {1: 2.3, 2: 3.2, 3: 1.5, 4: 4.1, 5: 3.7, 6: 1.1}
        avg = netflix_average_rating(cache)
        actual = (2.3 + 3.2 + 1.5 + 4.1 + 3.7 + 1.1) / 6

        self.assert_(type(avg) is float)
        self.assert_(actual == avg)
Beispiel #6
0
    def test_average_1(self):
        cache = {1: 2.334, 2: 3.324, 3: 1.443}
        avg = netflix_average_rating(cache)
        actual = (2.334 + 3.324 + 1.443) / 3

        self.assert_(type(avg) is float)
        self.assert_(actual == avg)