Closed DiegoTavares closed 2 weeks ago
@DiegoTavares I actually did some initial look into converting things to pytest. You can check some of the work in #1540
Edit:
One of the problems I found was that it was mocking sys.exit
which is not the actual function that's called to exit. @mock.patch('os._exit')
needs to be done instead.
@lithorus I propose we migrate all the python modules to pytest, similarly to what was done here. PyTest's output is way easier to follow and it is more reliable when it comes to having snippet that calls sys.exit
@lithorus I propose we migrate all the python modules to pytest, similarly to what was done here. PyTest's output is way easier to follow and it is more reliable when it comes to having snippet that calls
sys.exit
I agree. When testing with it I also found it to have better output, but it just seemed like a big task for what I was trying to do at the time.
This PR requires a blog post or documentation entry to be merged
The unit tests were not reporting test failures and interruptions as expected, which caused us to be running with failed unit tests for a long time.
This PR replaces
unittest
withpytest
for RQD and fixes some of the relevant unit tests.