]> granicus.if.org Git - python/commitdiff
fix issue23157 - time_hashlib hadn't been ported to Python 3.
authorGregory P. Smith <greg@krypto.org>
Sun, 4 Jan 2015 08:36:04 +0000 (00:36 -0800)
committerGregory P. Smith <greg@krypto.org>
Sun, 4 Jan 2015 08:36:04 +0000 (00:36 -0800)
Lib/test/time_hashlib.py

index d9394630638d7186b09a151c76715fd249ae06aa..2585ecb7820711daf1eb97b4a7dfc4d13bacb517 100644 (file)
@@ -1,7 +1,8 @@
 # It's intended that this script be run by hand.  It runs speed tests on
 # hashlib functions; it does not test for correctness.
 
-import sys, time
+import sys
+import time
 import hashlib
 
 
@@ -9,8 +10,8 @@ def creatorFunc():
     raise RuntimeError("eek, creatorFunc not overridden")
 
 def test_scaled_msg(scale, name):
-    iterations = 106201/scale * 20
-    longStr = 'Z'*scale
+    iterations = 106201//scale * 20
+    longStr = b'Z'*scale
 
     localCF = creatorFunc
     start = time.time()