def test_clear(self): with raises(TypeError): d = ImmutableDict({'test': 'blah', 'something': '2'}) d.clear()
def test_deep_copy(self): d = ImmutableDict({'test': 'blah', 'something': '2'}) d2 = deepcopy(d) d3 = d.copy() assert d == d2 assert d == d3
def test_delete(self): with raises(TypeError): d = ImmutableDict({'test': 'blah', 'something': '2'}) del d['test']
def test_copy(self): d = ImmutableDict({'test': 'blah', 'something': '2'}) c = copy(d) c['blah'] = 'blah' assert d != c
def test_set_value(self): with raises(TypeError): d = ImmutableDict() d['something'] = 'test'
def test_create(self): d = ImmutableDict({'test': 'blah', 'something': '2'}) assert d.__len__() == 2
def test_create(self): d = ImmutableDict({'test': 'blah', 'something': '2'}) assert len(d) == 2
def test_clear(self): d = ImmutableDict({'test': 'blah', 'something': '2'}) d.clear()
def test_delete(self): d = ImmutableDict({'test': 'blah', 'something': '2'}) del d['test']
def test_set_value(self): d = ImmutableDict() d['something'] = 'test'