Even though there is nothing wrong with unittest in Python, pytest offers more flexibility and in my opinion a somewhat easier and more intuitive API. I propose to use pytest to run our tests from now on. This doesn't require a refactor of existing tests (which would be a big effort for a small benefit) because pytest can run unittest-based tests too:
https://docs.pytest.org/en/7.1.x/how-to/unittest.html
This change will enable us to write tests faster in the future
Even though there is nothing wrong with
unittestin Python,pytestoffers more flexibility and in my opinion a somewhat easier and more intuitive API. I propose to usepytestto run our tests from now on. This doesn't require a refactor of existing tests (which would be a big effort for a small benefit) becausepytestcan rununittest-based tests too:https://docs.pytest.org/en/7.1.x/how-to/unittest.html
This change will enable us to write tests faster in the future