def test_predict_3(self):
     r = StringIO.StringIO(
         "COSTUMERS_RATE\n1 3.4\n2 4.4\n3 2.4\n5 1.2\n4 2.2\nMOVIE_RATES\n2 2.5\n1 3.5\n5 5"
     )
     getCatch(r)
     b = predict('5', '5')
     self.assert_(b == 3.1)
	def test_predict_14(self) :
		v = predict('1768404', '6972')
		assert 0 < v <= 5
	def test_predict_13(self) :
		v = predict('585596', '5991')
		assert 0 < v <= 5
Exemple #4
0
	def test_predict_2(self):
		a = predict(1442411, 1774)
		self.assert_(a >= 0 and a <= 5)
Exemple #5
0
 def test_predict_2(self):
     rating = predict(self.caches, 3949, 2484454)
     self.assertEqual(3.9, rating)
Exemple #6
0
 def test_predict_2(self):
     a = predict(1442411, 1774)
     self.assert_(a >= 0 and a <= 5)
	def test_predict_04(self) :
		v = predict('135008', '17088')
		assert 0.5 <= v <= 3.5
 def test_prediction_3(self):
     """Tests that predictions of valid input are between 1 and 5"""
     value = predict(10016, 234929)
     self.assertTrue(1.0 <= value and 5.0 >= value)
	def test_predict_02(self) :
		v = predict('1449120', '4298')
		assert 2.5 < v < 5
	def test_predict_03(self) :
		v = predict('1329465','17088')
		assert 1.5 <= v <= 4.5
	def test_predict_01(self) :
		v = predict('1764929', '9582')
		assert 1.5 < v < 4.5
 def test_predict_3 (self) :
     r = StringIO.StringIO("COSTUMERS_RATE\n1 3.4\n2 4.4\n3 2.4\n5 1.2\n4 2.2\nMOVIE_RATES\n2 2.5\n1 3.5\n5 5")
     getCatch(r)
     b = predict('5', '5')
     self.assert_(b == 3.1)
Exemple #13
0
	def test_predict_3(self):
		a = predict(22601, 9999)
		self.assert_(a >= 0 and a <= 5)
	def test_predict_15(self) :
		v = predict('1223817', '6972')
		assert 0 < v <= 5
	def test_predict_05(self) :
		v = predict('1587695', '4345')
		assert 1.5 <= v <= 4.5
 def test_prediction(self):
     """Tests that predictions of valid input are between 1 and 5"""
     value = predict(1, 30878)
     self.assertTrue(1.0 <= value and 5.0 >= value)
	def test_predict_06(self) :
		v = predict('1316853', '9348')
		assert 2.5 <= v <= 5.5
Exemple #18
0
 def test_predict_1(self):
     a = predict(2097148, 10)
     self.assert_(a >= 0 and a <= 5)
	def test_predict_07(self) :
		v = predict('2274079', '11405')
		assert 3.5 <= v <= 6
Exemple #20
0
 def test_predict_3(self):
     a = predict(22601, 9999)
     self.assert_(a >= 0 and a <= 5)
	def test_predict_08(self) :
		v = predict('1931013', '16948')
		assert 3.5 <= v <= 6.5
Exemple #22
0
 def test_predict_1(self):
     rating = predict(self.caches, 4335, 1585790)
     self.assertEqual(3.5, rating)
	def test_predict_09(self) :
		v = predict('143658', '16412')
		assert 3.5 <= v <= 6
Exemple #24
0
 def test_predict_3(self):
     rating = predict(self.caches, 5370, 756299)
     self.assertEqual(3.2, rating)
Exemple #25
0
	def test_predict_1(self):
		a = predict(2097148, 10)
		self.assert_(a >= 0 and a <= 5)