示例#1
0
文件: test_misc.py 项目: p3trus/slave
 def test_with_out_of_range_index(self):
     with pytest.raises(IndexError):
         assert index(11, 10)
示例#2
0
文件: test_misc.py 项目: p3trus/slave
 def test_with_negative_index(self):
     assert index(-2, 10) == 8
示例#3
0
文件: test_misc.py 项目: p3trus/slave
 def test_with_index_inrange(self):
     assert index(2, 10) == 2
示例#4
0
 def test_with_out_of_range_index(self):
     with pytest.raises(IndexError):
         assert index(11, 10)
示例#5
0
 def test_with_negative_index(self):
     assert index(-2, 10) == 8
示例#6
0
 def test_with_index_inrange(self):
     assert index(2, 10) == 2