Exemplo n.º 1
0
 def test_two_ropes_no_intersections(self):
     ropes = [(2, 2), (3, 5)]
     self.assertEquals(0, calculate_intersections(ropes))
Exemplo n.º 2
0
 def test_three_ropes_two_intersections(self):
     ropes = [(1, 10), (5, 5), (7, 7)]
     self.assertEquals(2, calculate_intersections(ropes))
Exemplo n.º 3
0
 def test_one_rope_no_intersections(self):
     ropes = [(1, 3)]
     self.assertEquals(0, calculate_intersections(ropes))
Exemplo n.º 4
0
 def test_two_ropes_one_intersection(self):
     ropes = [(1, 2), (2, 1)]
     self.assertEquals(1, calculate_intersections(ropes))
Exemplo n.º 5
0
 def test_another_two_ropes_one_intersection(self):
     ropes = [(2, 10), (3, 1)]
     self.assertEquals(1, calculate_intersections(ropes))
Exemplo n.º 6
0
 def test_two_ropes_no_intersections(self):
     ropes = [[2, 2], [3, 5]]
     self.assertEquals(0, calculate_intersections(ropes))
Exemplo n.º 7
0
 def test_three_ropes_no_intersections(self):
     ropes = [(1, 1), (2, 3), (4, 5)]
     self.assertEquals(0, calculate_intersections(ropes))
Exemplo n.º 8
0
 def test_one_rope_no_intersections(self):
     ropes = [[1, 3]]
     self.assertEquals(0, calculate_intersections(ropes))
Exemplo n.º 9
0
 def test_three_ropes_two_intersections(self):
     ropes = [[1, 10], [5, 5], [7, 7]]
     self.assertEquals(2, calculate_intersections(ropes))
Exemplo n.º 10
0
 def test_another_two_ropes_one_intersection(self):
     ropes = [[2, 10], [3, 1]]
     self.assertEquals(1, calculate_intersections(ropes))
Exemplo n.º 11
0
 def test_two_ropes_one_intersection(self):
     ropes = [[1, 2], [2, 1]]
     self.assertEquals(1, calculate_intersections(ropes))
Exemplo n.º 12
0
 def test_three_ropes_no_intersections(self):
     ropes = [[1, 1], [2, 3], [4, 5]]
     self.assertEquals(0, calculate_intersections(ropes))