コード例 #1
0
ファイル: test_pyutils.py プロジェクト: rudnerlq/astropop
def test_indexeddict_index(val, res):
    a = IndexedDict(a=1, b=2, c=3, d=4)
    check.equal(a.index(val), res)
コード例 #2
0
ファイル: test_pyutils.py プロジェクト: rudnerlq/astropop
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)