Closed rozsasarpi closed 2 years ago
Running unittest
s with pytest
is an intentional feature :)
History: When I started coding in python, I used unittest
mainly because it is in the standard library and somehow stuck to it. Over time though, I swapped to pytest
to run the tests. If I remember correctly, that was because of its nice integration with codecov
. And we somehow copied that approach to probeye.
But note that I have no strong preferences, all frameworks seem to cover the simple (mainy assert true and assert almost equal and no mocking etc) tests.
Thanks for the explanation. Is it preferred to add new tests using unittest
to keep things consistent or it is ok to mix in pytest
? I find the unittest
approach verbose with its classes.
Personally, I don't mind if you write new tests in pytest (we just have to add it in the setup.cfg). I just adapted the unittest-approach from our previous BayesianInference package.
pytest
is already a dependency in setup.cfg
:) https://github.com/BAMresearch/probeye/blob/034ff1ae05943400cdc9c228101303c3ce8a1806/setup.cfg#L36
The tests in the
tests
folder all seem to useunittest
but the GitHub action pipeline usespytest
. Is this intentional?