Example #1
0
def test_indexeddict_insert_at_away():
    a = IndexedDict(a=1, b=2, c=3, d=4)
    a.insert_at(42, 'e', 5)
    check.equal(a, {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5})
Example #2
0
def test_indexeddict_insert_at_negative():
    a = IndexedDict(a=1, b=2, c=3, d=4)
    a.insert_at(-2, 'e', 5)
    check.equal(a, {'a': 1, 'b': 2, 'c': 3, 'e': 5, 'd': 4})
Example #3
0
 def test_indexeddict_insert_at_last(self):
     a = IndexedDict(a=1, b=2, c=3, d=4)
     a.insert_at(4, 'e', 5)
     assert_equal(a, {'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5})