Django

Code

Show
Ignore:
Timestamp:
08/24/08 23:00:15 (3 months ago)
Author:
mtredinnick
Message:

Fixed #7496 -- It's now possible to pickle SortedDicts? with pickle protocol 2
(used in caching). Thanks, John Huddleston.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/datastructures/tests.py

    r8399 r8531  
    22# Tests for stuff in django.utils.datastructures. 
    33 
     4>>> import pickle 
    45>>> from django.utils.datastructures import * 
    56 
     
    104105{1: 'one', 0: 'zero', 2: 'two'} 
    105106 
     107>>> pickle.loads(pickle.dumps(d, 2)) 
     108{1: 'one', 0: 'zero', 2: 'two'} 
     109 
    106110>>> d.clear() 
    107111>>> d 
     
    110114[] 
    111115 
    112 ### DotExpandedDict ############################################################ 
     116### DotExpandedDict ########################################################## 
    113117 
    114118>>> d = DotExpandedDict({'person.1.firstname': ['Simon'], 'person.1.lastname': ['Willison'], 'person.2.firstname': ['Adrian'], 'person.2.lastname': ['Holovaty']}) 
     
    120124['Adrian'] 
    121125 
    122 ### ImmutableList ################################################################ 
     126### ImmutableList ############################################################ 
    123127>>> d = ImmutableList(range(10)) 
    124128>>> d.sort()