[Python-checkins] cpython (merge 3.4 -> default): fix issue23157 - time_hashlib hadn't been ported to Python 3.

gregory.p.smith python-checkins at python.org
Sun Jan 4 09:37:21 CET 2015


https://hg.python.org/cpython/rev/b96985753613
changeset: 94015:b96985753613
parent: 94013:d53506fe31e1
parent: 94014:badb7e319ed0
user: Gregory P. Smith <greg at krypto.org>
date: Sun Jan 04 00:36:59 2015 -0800
summary:
 fix issue23157 - time_hashlib hadn't been ported to Python 3.
files:
 Lib/test/time_hashlib.py | 7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Lib/test/time_hashlib.py b/Lib/test/time_hashlib.py
--- a/Lib/test/time_hashlib.py
+++ b/Lib/test/time_hashlib.py
@@ -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 @@
 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()
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /