original_docstring: Writes a valid unit test for the service implementation.
docstring: Writes a valid unit test for the service implementation.
docstring_tokens: Writes a valid unit test for the service implementation .
code: def WriteValidUnitTest(self, func, file, test, *extras):
      """Writes a valid unit test for the service implementation."""
      if func.GetInfo('expectation') == False:
        test = self._remove_expected_call_re.sub('', test)
      name = func.name
      arg_strings = [
        arg.GetValidArg(func) \
        for arg in func.GetOriginalArgs() if not arg.IsConstant()
      ]
      gl_arg_strings = [
        arg.GetValidGLArg(func) \
        for arg in func.GetOriginalArgs()
      ]
      gl_func_name = func.GetGLTestFunctionName()
      vars = {
        'name':name,
        'gl_func_name': gl_func_name,
        'args': ", ".join(arg_strings),
        'gl_args': ", ".join(gl_arg_strings),
      }
      for extra in extras:
        vars.update(extra)
      old_test = ""
      while (old_test != test):
        old_test = test
        test = test % vars
      file.Write(test % vars)
code_tokens: def WriteValidUnitTest ( self , func , file , test , * extras ) : if func . GetInfo ( 'expectation' ) == False : test = self . _remove_expected_call_re . sub ( '' , test ) name = func . name arg_strings = [ arg . GetValidArg ( func ) for arg in func . GetOriginalArgs ( ) if not arg . IsConstant ( ) ] gl_arg_strings = [ arg . GetValidGLArg ( func ) for arg in func . GetOriginalArgs ( ) ] gl_func_name = func . GetGLTestFunctionName ( ) vars = { 'name' : name , 'gl_func_name' : gl_func_name , 'args' : ", " . join ( arg_strings ) , 'gl_args' : ", " . join ( gl_arg_strings ) , } for extra in extras : vars . update ( extra ) old_test = "" while ( old_test != test ) : old_test = test test = test % vars file . Write ( test % vars )
short_docstring: Writes a valid unit test for the service implementation.
short_docstring_tokens: Writes a valid unit test for the service implementation .
comment: """Writes a valid unit test for the service implementation."""