Пример #1
0
def test_indexeddict_index(val, res):
    a = IndexedDict(a=1, b=2, c=3, d=4)
    check.equal(a.index(val), res)
Пример #2
0
def test_indexeddict_invalid_key():
    a = IndexedDict(a=1, b=2, c=3, d=4)
    with pytest.raises(KeyError):
        a.index('e')
Пример #3
0
 def test_indexeddict_index(self, val, res):
     a = IndexedDict(a=1, b=2, c=3, d=4)
     assert_equal(a.index(val), res)