Some of my tests are taking long time, and I want to have an option to run only short tests or all tests. I have found option to disable some tests (Disable individual Python unit tests temporarily), but I didn't find option to, for example, set some flag in python -m unittest
run those disabled tests anyway. What's the best practice here?
Asked
Active
Viewed 138 times
1

krzysztofs
- 33
- 5
-
Thank you for your answer, but I am using unittest, not pytest. – krzysztofs Aug 31 '20 at 12:12
-
Ah, sorry - as far as I know, there is no such flag in unittest. You could use `skipif`instead and check for some environment variable, which you have to set if you want to run (or skip) the tests. – MrBean Bremen Aug 31 '20 at 12:18
-
That seems to work, thank you very much! – krzysztofs Aug 31 '20 at 12:37