コード例 #1
0
 def test_average_y_values(self):
     """average y values should return points for a function by averaging y values for points with same x coordinate"""
     
     points = [[0,0],[1,3],[1,5],[3,3],[4,1]]
     obs = average_y_values(points)
     exp = [(0,0.0),(1,4.0),(3,3.0),(4,1.0)]
     self.assertEqual(obs,exp)
コード例 #2
0
    def test_average_y_values(self):
        """average y values should return points for a function by averaging y values for points with same x coordinate"""

        points = [[0,0],[1,3],[1,5],[3,3],[4,1]]
        obs = average_y_values(points)
        exp = [(0,0.0),(1,4.0),(3,3.0),(4,1.0)]
        self.assertEqual(obs,exp)