I flagged this answer as "very low quality" because it's proposing a terrible idea:
Determine if code is running as part of a unit test
I can accept that the flag was disputed, but I honestly don't understand why.
Personally, if I saw someone writing code like this I'd actually hit them in the neck and tell them to get sober.
Is it just being left out there to stand out as a bad example for people who are trying to learn something?