[Checkins] SVN: DateTime/trunk/src/DateTime/pytz.txt don't rely on dict.keys() order or it being sortable

Hano Schlichting cvs-admin at zope.org
Sat Feb 23 15:10:04 UTC 2013


Log message for revision 129712:
  don't rely on dict.keys() order or it being sortable
  

Changed:
  U   DateTime/trunk/src/DateTime/pytz.txt

-=-
Modified: DateTime/trunk/src/DateTime/pytz.txt
===================================================================
--- DateTime/trunk/src/DateTime/pytz.txt	2013-02-23 15:05:48 UTC (rev 129711)
+++ DateTime/trunk/src/DateTime/pytz.txt	2013-02-23 15:10:04 UTC (rev 129712)
@@ -134,8 +134,12 @@
 The _zidx attribute is a list of lower-case and possibly abbreviated
 time zone names that can be mapped to offical zone names.
 
-    >>> cache._zidx #doctest: +ELLIPSIS
-    [... 'australia/yancowinna'... 'gmt+0500'... 'europe/isle_of_man'...]
+    >>> 'australia/yancowinna' in cache._zidx
+    True
+    >>> 'europe/isle_of_man' in cache._zidx
+    True
+    >>> 'gmt+0500' in cache._zidx
+    True
 
 Note that there are more items in _zidx than in _zlst since there are
 multiple names for some time zones.
@@ -162,10 +166,8 @@
 
 Let's make sure that _zmap and _zidx agree.
 
-    >>> idx = list(cache._zidx)
-    >>> idx.sort()
-    >>> keys = cache._zmap.keys()
-    >>> keys.sort()
+    >>> idx = set(cache._zidx)
+    >>> keys = set(cache._zmap.keys())
     >>> idx == keys
     True
 



More information about the checkins mailing list