Kaydet (Commit) 5719ef17 authored tarafından Gregory P. Smith's avatar Gregory P. Smith

fix issue23157 - time_hashlib hadn't been ported to Python 3.

üst b8f35ff5
# It's intended that this script be run by hand. It runs speed tests on # It's intended that this script be run by hand. It runs speed tests on
# hashlib functions; it does not test for correctness. # hashlib functions; it does not test for correctness.
import sys, time import sys
import time
import hashlib import hashlib
...@@ -9,8 +10,8 @@ def creatorFunc(): ...@@ -9,8 +10,8 @@ def creatorFunc():
raise RuntimeError("eek, creatorFunc not overridden") raise RuntimeError("eek, creatorFunc not overridden")
def test_scaled_msg(scale, name): def test_scaled_msg(scale, name):
iterations = 106201/scale * 20 iterations = 106201//scale * 20
longStr = 'Z'*scale longStr = b'Z'*scale
localCF = creatorFunc localCF = creatorFunc
start = time.time() start = time.time()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment