okfn-brasil / serenata-toolbox

📦 pip module containing code shared across Serenata de Amor's projects | ** Este repositório não recebe atualizações frequentes **
MIT License
154 stars 69 forks source link

Refactor deputies dataset tests #166

Closed anaschwendler closed 6 years ago

anaschwendler commented 6 years ago

What is the purpose of this Pull Request? Since yesterday we've been needing some fixes in our tests. @cuducos has fixed the asyncio tests in #162 and another little bug has appeared with the sets of tests in deputies dataset order. This PR fix that error.

What was done to achieve this purpose? Basically we refactored the lists to sets structure, so its order don't matter, since the problem was that the order was inverted.

How to test if it really works? Run the tests:

$ pip install pytest pytest-cov
$ pytest

Who can help reviewing it? @cuducos

cuducos commented 6 years ago

I wouldn't call it a minor version bump, just a micro. From README.md:

MICRO: the API is the same, no risk of breaking code MINOR: values have been added, existing values are unchanged MAJOR: existing values have been changed or removed

By refactoring the tests the public API is exactly the same, no risk of breaking code. Yet no new values added and existing values are unchanged. What do you think?

anaschwendler commented 6 years ago

By refactoring the tests the public API is exactly the same, no risk of breaking code. Yet no new values added and existing values are unchanged. What do you think?

I agree, I just didn't knew which one to change, nothing was added its true, I'll change that ;)

cuducos commented 6 years ago

I just didn't knew which one to change

Feel free to suggest something different for that bit of the README.md if you have enhancements ideas ; )

cuducos commented 6 years ago

Yay :tada:

  1. Brought the branch to my local environment:
$ git fetch origin && git checkout -b anaschwendler-refactor-deputies-dataset-tests origin/anaschwendler-refactor-deputies-dataset-tests
  1. Ran unit tests:
$ pytest tests/unit