def IsolatedYcmd( custom_options = {} ):
  def Decorator( test ):
    @functools.wraps( test )
    def Wrapper( test_case_instance, *args, **kwargs ):
      with IsolatedApp( custom_options ) as app:
        try:
          test( test_case_instance, app, *args, **kwargs )
        finally:
          global shared_filepaths
          for filepath in shared_filepaths.get( app, [] ):
            StopCompleterServer( app, 'cs', filepath )
    return Wrapper
  return Decorator