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

Fixes encrypt(), decrypt() and messages encode_defunct() doctests #84

Merged

Conversation

AndreMiras
Copy link
Contributor

This is a follow up for comments to PR #49, closes #81.

What was wrong?

Some doctests from account.Account.encrypt(), account.Account.decrypt() and messages.encode_defunct() were disabled (+SKIP) because they were failing.

Issue #81

How was it fixed?

  • account.Account.encrypt() is now providing full deterministic input, including the input password
  • account.Account.decrypt()
    • leverages doctest ELLIPSIS for non deterministic output
    • uses pprint() for clean indentation matching and deterministic dictionary key ordering
  • messages.encode_defunct() uses to_hex() & to_bytes() from eth_utils rather than web3

Cute Animal Picture

image

@pipermerriam
Copy link
Member

Thank you very much for this cleanup.

@pipermerriam pipermerriam merged commit a0a6063 into ethereum:master Jan 20, 2020
@AndreMiras AndreMiras deleted the feature/ticket81_fixes_more_doctests branch January 20, 2020 16:50
pacrob pushed a commit to pacrob/eth-account that referenced this pull request Apr 26, 2023
pacrob pushed a commit to pacrob/eth-account that referenced this pull request Jan 30, 2024
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.

Doctest Account encrypt()/decrypt()
2 participants