예제 #1
0
 def test_returns_false_when_point_on_right_edge(self):
     self.assertFalse(Game.point_in_rectangle((10, 0), (-2, -3), (10, 12)))
예제 #2
0
 def test_returns_false_when_point_is_east_of_rectangle(self):
     self.assertFalse(Game.point_in_rectangle((14, 1), (-2, -3), (10, 12)))
예제 #3
0
 def test_returns_false_when_point_is_south_west_of_rectangle(self):
     self.assertFalse(Game.point_in_rectangle((-5, 13), (-2, -3), (10, 12)))
예제 #4
0
 def test_returns_false_when_point_is_north_of_rectangle(self):
     self.assertFalse(Game.point_in_rectangle((0, -5), (-2, -3), (10, 12)))
예제 #5
0
 def test_returns_true_when_point_inside_rectangle(self):
     self.assertTrue(Game.point_in_rectangle((5, 6), (-2, -3), (10, 12)))