[Checkins] SVN: z3c.datagenerator/trunk/src/z3c/datagenerator/ try a different approach on fixing the test

Adam Groszer cvs-admin at zope.org
Wed Sep 12 07:50:43 UTC 2012


Log message for revision 127825:
  try a different approach on fixing the test

Changed:
  U   z3c.datagenerator/trunk/src/z3c/datagenerator/README.txt
  U   z3c.datagenerator/trunk/src/z3c/datagenerator/generator.py

-=-
Modified: z3c.datagenerator/trunk/src/z3c/datagenerator/README.txt
===================================================================
--- z3c.datagenerator/trunk/src/z3c/datagenerator/README.txt	2012-09-11 20:48:38 UTC (rev 127824)
+++ z3c.datagenerator/trunk/src/z3c/datagenerator/README.txt	2012-09-12 07:50:38 UTC (rev 127825)
@@ -15,7 +15,7 @@
   1149756166
   >>> consistent_hash('')
   0
-  >>> consistent_hash('0')
-  4108050209
+  >>> consistent_hash('0') == 4108050209
+  True
 
 (More tests needed, obviously.)

Modified: z3c.datagenerator/trunk/src/z3c/datagenerator/generator.py
===================================================================
--- z3c.datagenerator/trunk/src/z3c/datagenerator/generator.py	2012-09-11 20:48:38 UTC (rev 127824)
+++ z3c.datagenerator/trunk/src/z3c/datagenerator/generator.py	2012-09-12 07:50:38 UTC (rev 127825)
@@ -29,7 +29,7 @@
 def consistent_hash(buf):
     # Produce a hash of a string that behaves consistently in Python 32 and
     # 64 bit.  The "& 0xffffffff" interprets negative numbers as positive.
-    return int(crc32(buf) & 0xffffffff)
+    return crc32(buf) & 0xffffffff
 
 
 class VocabularyDataGenerator(object):



More information about the checkins mailing list