Пример #1
0
 def test_cust_avg3(self):
     trainingSetDir = "test/5_movies_5_cust/"
     w = StringIO.StringIO()
     netflix_cust_avg(trainingSetDir, w)
     self.assert_(w.getvalue() == '100=3.0\n200=3.0\n300=3.0\n400=3.0\n500=3.0\n')
Пример #2
0
 def test_cust_avg2(self):
     trainingSetDir = "test/5_movies_1_cust/"
     w = StringIO.StringIO()
     netflix_cust_avg(trainingSetDir, w)
     self.assert_(w.getvalue() == '1=1.0\n')