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

Migrate tests to pytest #21

Closed
naterush opened this issue Oct 10, 2017 · 3 comments
Closed

Migrate tests to pytest #21

naterush opened this issue Oct 10, 2017 · 3 comments
Assignees

Comments

@naterush
Copy link
Collaborator

naterush commented Oct 10, 2017

Issue

  • Currently, we use unittest as our unit testing framework, which is limiting in terms of using command line arguments w/ tests.
  • lengthy self.assertEquals statements are lengthy :)

Proposed implementation

Move to pytest as our unit testing framework. Should be a simple enough refactor - but will allow for better command line arguments and cleaner tests.

Subtasks...

  • add command line arg to enable plotting test graphs
@djrtwo
Copy link
Collaborator

djrtwo commented Oct 10, 2017

pytest's parametrize feature will be particularly useful to us. It allows you to really easily use the same code for multiple versions of the test. For example, if we wanted to run test_is_in_blockchain against a bunch of different test_strings.

See here for a sample usage in web3.py

@djrtwo djrtwo self-assigned this Oct 10, 2017
@djrtwo
Copy link
Collaborator

djrtwo commented Oct 10, 2017

I'm picking this up.

@naterush
Copy link
Collaborator Author

Done here: #30

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

No branches or pull requests

2 participants