def test_len(self): dictionary = {} dictionary['key'] = [1, 2] update_dict(dictionary, 'key', [3]) ntools.eq_(dictionary['key'], [1, 2, 3])
def test_not_present(self): dictionary = {} update_dict(dictionary, 'key', [1, 2, 3, 4], 2) ntools.eq_(dictionary['key'], [3, 4])
def test_basic(self): dictionary = {} dictionary['key'] = [1, 2] update_dict(dictionary, 'key', [3], 2) ntools.eq_(dictionary['key'], [2, 3])