I am developing an API in Python using FastAPI. I followed the user guide on https://fastapi.tiangolo.com/ and am very satisfied with the application.
I wanted to upgrade the Python version from 3.8.3 to 3.10.7 but I experienced a strange behavior when executing the unit tests. After the successful collection and execution, PyTest does not stop. Therefore all pipelines time out and cannot proceed with the project.
Let me show you the details:
All tests are green and PyTest returns with exit code 0. Good!
After upgrading to 3.10.7 following happens:
It neither locally (Windows) nor on CI (Docker Container) stops. I considered event_loops that may be still running and other test plugins to execute the unit tests. I did not find a suitable solution yet.
Does anyone have an idea what the problem could originate from? Any help is much appreciated.
Cheers,
L.