Package translate :: Package misc :: Module test_dictutils

[hide private]
[frames] | no frames]

# Source Code for Module translate.misc.test_dictutils

     1  #!/usr/bin/env python
     2
     3  from translate.misc import dictutils
     4
     5
     6 -def test_add():
     7      d = dictutils.ordereddict()
     8      d[2] = 3
     9      assert len(d.order) == 1
    10
    11 -def test_delete():
    12      d = dictutils.ordereddict()
    13      d[2] = 3
    14      del d[2]
    15      assert len(d.order) == 0
    16
    17 -def test_pop():
    18      d = dictutils.ordereddict()
    19      d[2] = 3
    20      value = d.pop(2)
    21      assert len(d.order) == 0
    22      assert value == 3
    23