Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make pyflakes happy, comment out unused python unit test variable dec… #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pycryptopp/bench/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ def insecurerandstr(n):
return ''.join(map(chr, map(insecurerandom.randrange, [0]*n, [256]*n)))

def calib_clock():
interval = 1.0
#interval = 1.0

import time
tc = time.clock
tt = time.time
#tc = time.clock
#tt = time.time

def measure_sleep(x, clock):
st = clock()
#st = clock()
time.sleep(x)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just deleting calib_clock instead? It has no callers as far as I can tell. What good is it?


4 changes: 2 additions & 2 deletions src/pycryptopp/test/test_ed25519_kat.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def test_short(self):
vk2 = ed25519.VerifyingKey(vk_s)
self.failUnlessEqual(vk2, vk) # objects should compare equal
newsig = sk.sign(msg)
sig_R,sig_S = sig[:32],sig[32:]
newsig_R,newsig_S = newsig[:32],newsig[32:]
#sig_R,sig_S = sig[:32],sig[32:]
#newsig_R,newsig_S = newsig[:32],newsig[32:]
self.failUnlessEqual(hexlify(newsig), hexlify(sig)) # deterministic sigs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say just delete the lines, instead. Alternatively, rewrite them as English comments. "The first 32 bytes of sig are .... The rest of the bytes are ...".

self.failUnlessEqual(vk.verify(sig, msg), None) # no exception

Expand Down