Does anyone know the least hacky way of determining if Python code is being run by a unit test?
Thanks!
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.