While documenting issue #767, I noticed a typo (ValueError was ValueErorr) in TupleHash.update(). After fixing typo, I realized that this was dead code (not reachable by calling update(None); likely left over from an earlier version of this function as the existing unit test for update(None) expects TypeError not ValueError.
So, removed the if data is None precondition check for update() and confirmed unit tests pass.
Also, while I was here, expanded the unit tests to test the happy path for the newly supported ways to pass multiple byte strings as well as a regression test in test_update_negative() to catch that update(tuple) raises the expected exception.
While documenting issue #767, I noticed a typo (
ValueError
wasValueErorr
) inTupleHash.update()
. After fixing typo, I realized that this was dead code (not reachable by callingupdate(None)
; likely left over from an earlier version of this function as the existing unit test forupdate(None)
expectsTypeError
notValueError
.So, removed the
if data is None
precondition check forupdate()
and confirmed unit tests pass.Also, while I was here, expanded the unit tests to test the happy path for the newly supported ways to pass multiple byte strings as well as a regression test in
test_update_negative()
to catch thatupdate(tuple)
raises the expected exception.