Hi. In the past I was able to create unit test in Python, I found out there is this dependency quantconnect-stubs that allows you to run unit test against part of your code coupled to Quantconnect API.Unfortunetely this is not anywhere in the documentation, at least nothing that google or an llm was able to find. So I'm creating this post so at least there is any recollection in lean or quantconnect that in order to unit test QCAlgorithm you need to install quantconnect-stubs As the unit test will run outside lean, you will need to create a venv as part of your project, when running locally.

HTH