def test_items(self): b = BaseDict({'a': 1, 'b': 2, 'c': 3}) i = list(b.items()) i.sort() self.assertTrue(i, [( 'a', 1, ), ( 'b', 2, ), ( 'c', 3, )])
def test_items_with_pointer(self): d = {'a': 1, 'b': 2, 'c': 3} b = BaseDict(d) i = list(b.items()) i.sort() self.assertTrue(i, [( 'a', 1, ), ( 'b', 2, ), ( 'c', 3, )]) self.assertEqual(b, b.dict())
def test_items(self): b = BaseDict() b['a'] = 1 b['b'] = 2 b['c'] = 3 i = list(b.items()) i.sort() self.assertTrue(i, [( 'a', 1, ), ( 'b', 2, ), ( 'c', 3, )]) self.assertEqual(b, b.dict())