ifstatement to check if their program is running in the test environment vs the real environment.When that happens, there's a good chance that your microtests are testing fake code instead of real code.
|if ("test" in path)||Inspecting your environment to spot "test mode" is bad mojo. Don't do it.|
|if (system.clock is fake)||Checking for test artifacts in your program is out, too.|
|if (TESTING)||A test flag is at least explicit, but still no.|
|#ifdef TESTING||Conditional compiles? Iffy. Make sure your microtests are testing REAL code.|
|call_function(fake)||Passing a fake to a function is fine, provided that the function doesn't know it's working with a fake. After all, you are micro-testing the function, not the system!|