corpetty / py-etherscan-api

Python bindings to the Etherscan.io API
MIT License
510 stars 247 forks source link

Unit testing #20

Closed taylorjdawson closed 6 years ago

taylorjdawson commented 6 years ago

Under the TODOs you mention a unit test suite. Are you looking for unit tests beyond just assert statements? So using something like Python unittest module? Currently, there are only a few unit tests so before I add more I wanted to know which direction you'd like to go.

AndreMiras commented 6 years ago

Well I would recommend the built in Python unit test module. I would also recommend using tox to try different Python versions and other things, like PEP8 compliance. And last but not least setting some integration testing. I can help with all these topics if you give me a go.

corpetty commented 6 years ago

You certainly have a go on that one, and I agree with @AndreMiras on the route.

AndreMiras commented 6 years ago

Great here is the first pull request that brings tox and Travis all together https://github.com/corpetty/py-etherscan-api/pull/29 This is the first of a long serie, in next ones I would like to:

  1. drop pytest requirement and rely on core unittest module (you can still use the pytest command for testing locally if you like it)
  2. integrate linter checks and fix lint errors
  3. increase test coverage (maybe later)
corpetty commented 6 years ago

you can drop pytest completely. unittest works just fine for all. I have no preference.

AndreMiras commented 6 years ago

point 1 is fixed in https://github.com/corpetty/py-etherscan-api/pull/33 @corpetty can you merge so I tackle point 2