title: How to stub time.sleep() in Python unit testing
body: <p>I want to make a stub to prevent time.sleep(..) to sleep to improve the unit test execution time.</p>
  
  <p>What I have is:</p>
  
  <pre><code>import time as orgtime
  
  class time(orgtime):
      '''Stub for time.'''
      _sleep_speed_factor = 1.0
  
      @staticmethod
      def _set_sleep_speed_factor(sleep_speed_factor):
          '''Sets sleep speed.'''
          time._sleep_speed_factor = sleep_speed_factor
  
  
      @staticmethod
      def sleep(duration):
          '''Sleeps or not.'''
          print duration * time._sleep_speed_factor
          super.sleep(duration * time._sleep_speed_factor) 
  </code></pre>
  
  <p>However, I get the following error on the second code line above (class definition):</p>
  
  <pre><code>TypeError: Error when calling the metaclass bases
  module.__init__() takes at most 2 arguments (3 given).
  </code></pre>
  
  <p>How to fix the error?</p>