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