예제 #1
0
 def test_copy(self):
     dict1 = xmlstring2dict(xmlstr,
                            use_ord_dict=False,
                            always_singular_list=[])
     ordered_dict = OrderedDict(dict1)
     od2 = ordered_dict.copy()
     self.assertEqual(od2.__repr__(), ordered_dict.__repr__())
예제 #2
0
 def test_clear(self):
     dict1 = xmlstring2dict(xmlstr,
                            use_ord_dict=False,
                            always_singular_list=[])
     ordered_dict = OrderedDict(dict1)
     ordered_dict.clear()
     self.assertEqual('{}', ordered_dict.__repr__())