Closed lipemorais closed 7 years ago
As usual government web API are down on weekends. Gonna re-run tests later (or on Monday)…
@lipemorais Travis CI is still broken with an HTTP error
. Meanwhile would you mind pondering on two possibilities:
pytest
usage in the README.md
to assure a similar environment when developing locally and in the CI… what do you think about it?HTTP error
still some external API that is broken?Maybe document pytest usage in the README.md to assure a similar environment when developing locally and in the CI… what do you think about it?
I will do it soon. :)
Is the HTTP error still some external API that is broken? I checked the url that
Toolbox
tries to fetch and got404
Here is the url: http://www.camara.leg.br/cotas/Ano-2009.csv.zip
And a print of what I got:
@cuducos I will add t
Travis is green, yay! I think all we need now is a version bump ; )
There is a test breaking because this dataset is not available. :'(
Hey! @cuducos @jtemporal @anaschwendler do you have any idea about what can I do to fix this? :(
What about mocking the requests and using tiny fixtures instead?
@cuducos this is what we do in unit version of this test.
Yep. An IMHO opinion depending on external services to run the suites tests is a problem per se. If I'm not wrong we adopted the journey test this way (depending on external services) as a temporary fix. As this was not a permanent solution and, given that it is broken now, it might be an interesting opportunity to sor that out.
Not sure about what others @anaschwendler @jtemporal @Irio think of that though…
Hey, @cuducos @anaschwendler . Looks that it is working now. Could we re run travis?
Sure thing! Just restarted it ; )
Hasn't lasted long enough:
$ curl -I http://www.camara.leg.br/cotas/Ano-2008.csv.zip
HTTP/1.1 404 Not Found
Looks now that http://www.camara.leg.br/cotas/Ano-2008.csv.zip is out. :'(
Yay! May we have a version bump?
Yay! May we have a version bump?
Done in a7a2dc2a29dea1975bbe990229248c60cff8f9a1
What is the purpose of this Pull Request? The purpose of this PR is use pytest to help address the long time running some journey tests usings
--durations
, this way we know which test takes more time to run.What was done to achieve this purpose? I changed way we run tests to use pytest.
How to test if it really works? To test it you can just run
pytest --verbose --durations=10 --cov-report html tests/unit
after install pytest and pytest-cov usingpip install pytest pytest-cov
.Who can help reviewing it? @cuducos @jtemporal @anaschwendler
TODO
pytest.ini
fileYesterday I runned it on my machine and some tests took too long to run