class_docstr: Unit tests specific to retry decorator.
class_docstr_tok: ["Unit","tests","specific","to","retry","decorator","."]
docstr: Configures mocks for time.time and time.sleep such that every call
  to time.sleep(x) increments the return value of time.time() by x.
  
  mockTime:     time.time mock
  mockSleep:    time.sleep mock
docstr_tok: ["Configures","mocks","for","time.time","and","time.sleep","such","that","every","call","to","time.sleep","(","x",")","increments","the","return","value","of","time.time","(",")","by","x.","mockTime",":","time.time","mock","mockSleep",":","time.sleep","mock"]
code: def mockSleepTime(self, mockTime, mockSleep):
      """Configures mocks for time.time and time.sleep such that every call
      to time.sleep(x) increments the return value of time.time() by x.
  
      mockTime:     time.time mock
      mockSleep:    time.sleep mock
      """
  
      class _TimeContainer(object):
          accumulatedTime = 0
  
      def testTime():
          return _TimeContainer.accumulatedTime
  
      def testSleep(duration):
          _TimeContainer.accumulatedTime += duration
  
      mockTime.side_effect = testTime
      mockSleep.side_effect = testSleep
  
imports: from mock import patch, call, Mock
  from nupic.support.unittesthelpers.testcasebase import unittest
  from nupic.support import decorators
label_desc: Use image node_id 1 for calling the RetryDecoratorTest obj's underlying member method code with example usage: obj.mockSleepTime(mockTime, mockSleep) and returns: _TimeContainer