Does anyone know the least hacky way of determining if Python code is being run by a unit test?
Thanks!
I agree with all the comments.
Don't do this.
Your function/class/component should NOT behave differently under testing.
How to tell at runtime if you're inside of a unit test in Python?