class_docstr: Unit tests specific to retry decorator.
class_docstr_tok: ["Unit","tests","specific","to","retry","decorator","."]
docstr: Test that when timeoutSec == 0, function is executed exactly once
  with no retries, and raises an exception on failure.
docstr_tok: ["Test","that","when","timeoutSec","==","0",",","function","is","executed","exactly","once","with","no","retries",",","and","raises","an","exception","on","failure","."]
code: def testRetryNoTimeForRetries(self, mockTime, mockSleep):
      """Test that when timeoutSec == 0, function is executed exactly once
      with no retries, and raises an exception on failure.
      """
  
      self.mockSleepTime(mockTime, mockSleep)
  
      retryDecorator = decorators.retry(
          timeoutSec=0, initialRetryDelaySec=0.2, maxRetryDelaySec=10
      )
  
      testFunction = Mock(
          side_effect=TestParentException("Test exception"),
          __name__="testFunction",
          autospec=True,
      )
  
      with self.assertRaises(TestParentException):
          retryDecorator(testFunction)()
  
      self.assertFalse(mockSleep.called)
      testFunction.assert_called_once_with()
  
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 2 for calling the RetryDecoratorTest obj's underlying member method code with example usage: obj.testRetryNoTimeForRetries(mockTime, mockSleep) without return types