title: Development vs Release Python Code
body: <p>I am currently developing a Python application which I continually performance test, simply by recording the runtime of various parts.</p>
  
  <p>A lot of the code is related only to the testing environment and would not exist in the real world application, I have these separated into functions and at the moment I comment out these calls when testing. This requires me to remember which calls refer to test only components (they are quite interleaved so I cannot group the functionality). </p>
  
  <p>I was wondering if there was a better solution to this, the only idea I have had so far is creation of a 'mode' boolean and insertion of If statements, though this feels needlessly messy. I was hoping there might be some more standardised testing method that I am naive of.</p>
  
  <p>I am new to python so I may have overlooked some simple solutions. 
  Thank you in advance</p>