def test_are_first_quadrant(self): are_first1 = filter.are_in_first_quadrant( [point.Point(1, 1), point.Point(3, 5), point.Point(34, 7)]) are_first2 = filter.are_in_first_quadrant( [point.Point(-3, -5), point.Point(2, 5), point.Point(-4, 8)]) self.assertEqual( are_first1, [point.Point(1, 1), point.Point(3, 5), point.Point(34, 7)]) self.assertEqual(are_first2, [point.Point(2, 5)])
def are_in_first_quadrant_1(self): p1 = point.Point(0,0) p2 = point.Point(1, 1) p3 = point.Point(-1, 1) p4 = point.Point(-1, -1) p5 = point.Point(1, -1) l1 = filter.are_in_first_quadrant([p1, p2, p3, p4, p5]) l2 = [p2] self.assertListAlmostEqual(l1, l2)
def test_are_in_first_quadrant2(self): list = [(1,2),(0,0),(-2,-2),(-1,-2),(-3,1),(4,-5)] filter.are_in_first_quadrant(list) list.__eq__([1,2])
def test_are_in_first_quadrant(self): list = [(1,2),(3,4),(5,6)] filter.are_in_first_quadrant(list) list.__eq__([(1,2),(3,4),(5,6)])
def test_6(self): x = [[-1, 1], [2, 4], [-4, 4]] self.assertAlmostEqual(filter.are_in_first_quadrant(x), [[2, 4]]) # Add code here. pass
def test_5(self): x = [[1, 1], [-2, 4], [4, 4]] self.assertAlmostEqual(filter.are_in_first_quadrant(x), [[1, 1], [4, 4]])
def are_in_first_quadrant_2(self): p1 = point.Point(10, 10) p2 = point.Point(-10, -10) l1 = filter.are_in_first_quadrant([p1, p2]) l2 = [p1] self.assertListAlmostEqual(l1, l2)
def test_6(self): t = [[3, 4], [-2, -2], [-1, 2], [0, 0]] self.assertEqual(filter.are_in_first_quadrant(t), [[3, 4], [0, 0]])
def test_5(self): t = [[1, 2], [3, 4], [-1, 2], [-2, 2]] self.assertEqual(filter.are_in_first_quadrant(t), [[1, 2], [3, 4]])
def test_are_in_first_quadrant2(self): pt_list = [point.Point(1,2), point.Point(3,3)] new_list = [point.Point(1,2), point.Point(3,3)] self.assertEqual(filter.are_in_first_quadrant(pt_list), new_list)