Exemplo n.º 1
0
 def test_with_out_of_range_index(self):
     with pytest.raises(IndexError):
         assert index(11, 10)
Exemplo n.º 2
0
 def test_with_negative_index(self):
     assert index(-2, 10) == 8
Exemplo n.º 3
0
 def test_with_index_inrange(self):
     assert index(2, 10) == 2
Exemplo n.º 4
0
 def test_with_out_of_range_index(self):
     with pytest.raises(IndexError):
         assert index(11, 10)
Exemplo n.º 5
0
 def test_with_negative_index(self):
     assert index(-2, 10) == 8
Exemplo n.º 6
0
 def test_with_index_inrange(self):
     assert index(2, 10) == 2