def test_bin_dict_update(self): d1 = BinDict() d1[1] = 1 d2 = BinDict() d2[2] = 2 d1.update(d2) self.assertEquals(d1, {1: 1, 2: 2})
def test_bin_dict_pop(self): d = BinDict() d[1] = 2 d.pop(1) self.assertEquals(d.dict, [])
def test_bin_dict_keys(self): d = BinDict() d[1] = 2 d[2] = 3 self.assertEquals(d.keys(), [1, 2])
def test_bin_dict_items(self): d = BinDict() d[1] = 2 self.assertEquals(d.items(), [(1, 2)])
def test_bin_dict_get(self): d = BinDict() d[1] = 2 self.assertEquals(d.get(1), 2)
def test_bin_dict_fromkeys(self): d = BinDict() self.assertEquals(d.fromkeys([1, 2, 3]), {1: None, 2: None, 3: None})
def test_bin_dict_setitem2(self): d = BinDict() d[1] = 1 d[1] = 2 self.assertEquals(d[1], 2)
def test_bin_dict_setdefault2(self): d = BinDict() d.setdefault(1, 231) self.assertEquals(d[1], 231)
def test_bin_dict_repr(self): d = BinDict() d[1] = 1 self.assertEquals(d.__repr__(), "{1: 1}")
def test_bin_dict_ne(self): d1 = BinDict() d1[1] = 1 d2 = BinDict() d2[1] = 2 self.assertEquals(d1 != d2, True)
def test_bin_dict_eq2(self): d1 = BinDict() d1[1] = 1 d2 = BinDict() d2[1] = 2 self.assertEquals(d1 == d2, False)
def test_bin_dict_eq1(self): d1 = BinDict() d1[1] = 1 d2 = BinDict() d2[1] = 1 self.assertEquals(d1 == d2, True)
def test_bin_dict_contains(self): d = BinDict() d[1] = 1 self.assertEquals(1 in d, True)
def test_bin_dict_delitem(self): d = BinDict() d[1] = 1 del d[1] self.assertEquals(len(d), 0)
def test_bin_dict_popitem(self): d = BinDict() d[1] = 2 self.assertEquals(d.popitem(1), (1, 2))
def test_bin_dict_values(self): d = BinDict() d[1] = 2 self.assertEquals(d.values(), [2])
def test_bin_dict_clear(self): d = BinDict() d[1] = 1 d.clear() self.assertEquals(d.dict, [])
def test_bin_dict_copy(self): d = BinDict() d[1] = 1 self.assertEquals(d.copy(), {1: 1})
def test_bin_dict_setitem1(self): d = BinDict() d[1] = 1 self.assertEquals(d[1], 1)