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