Author pitrou
Recipients eric.araujo, gregory.p.smith, packetslave, pitrou
Date 2012-03-25.15:17:44
SpamBayes Score 1.39089e-06
Marked as misclassified No
Message-id <1332688665.1.0.552526119889.issue14322@psf.upfronthosting.co.za>
In-reply-to
Content
Some style comments:

- don't use "except: self.fail()", just let the exception pass through

- when monkeypatching hmac.new, use a try...finally block so that the mock doesn't stay in place if the test fails for whatever reason

- it's a bit of a nit, but when using "with warnings.catch_warnings", I would put the asserts on the context manager result outside of the "with" block

- I get a warning in test_noncallable_digestmod, it would be nice to silence it:

/home/antoine/cpython/default/Lib/test/test_hmac.py:254: RuntimeWarning: No block_size attribute on given digest object; Assuming 64.
  h = hmac.HMAC(b"key", b"", hmac)
History
Date User Action Args
2012-03-25 15:17:45pitrousetrecipients: + pitrou, gregory.p.smith, eric.araujo, packetslave
2012-03-25 15:17:45pitrousetmessageid: <1332688665.1.0.552526119889.issue14322@psf.upfronthosting.co.za>
2012-03-25 15:17:44pitroulinkissue14322 messages
2012-03-25 15:17:44pitroucreate