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

Expand unit tests for TupleHash.update() #768

Merged
merged 5 commits into from
Sep 24, 2023
Merged

Conversation

jelaiw
Copy link
Contributor

@jelaiw jelaiw commented Sep 24, 2023

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.

@Legrandin Legrandin merged commit 6b7a58f into Legrandin:master Sep 24, 2023
37 checks passed
@Legrandin
Copy link
Owner

Merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants