AcademySoftwareFoundation / OpenCue

A render management system you can deploy for visual effects and animation productions.
https://www.opencue.io
Apache License 2.0
832 stars 202 forks source link

[rqd] Rqd tests were not being executed #1560

Closed DiegoTavares closed 2 weeks ago

DiegoTavares commented 3 weeks ago

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 with pytest for RQD and fixes some of the relevant unit tests.

lithorus commented 3 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.

DiegoTavares commented 3 weeks ago

@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 commented 3 weeks ago

@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.

DiegoTavares commented 3 weeks ago

This PR requires a blog post or documentation entry to be merged