Example #1
0
    def Wrapper(*args, **kwargs):
        old_server_state = handlers._server_state

        try:
            app = SetUpApp()
            app.post_json("/ignore_extra_conf_file", {"filepath": PathToTestFile(".ycm_extra_conf.py")})
            test(app, *args, **kwargs)
        finally:
            handlers._server_state = old_server_state
Example #2
0
def setUpPackage():
    """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
    global shared_app

    shared_app = SetUpApp()
    shared_app.post_json("/ignore_extra_conf_file", {"filepath": PathToTestFile(".ycm_extra_conf.py")})
Example #3
0
    def Wrapper(*args, **kwargs):
        old_server_state = handlers._server_state

        try:
            app = SetUpApp()
            app.post_json('/ignore_extra_conf_file',
                          {'filepath': PathToTestFile('.ycm_extra_conf.py')})
            test(app, *args, **kwargs)
        finally:
            handlers._server_state = old_server_state
Example #4
0
 def Wrapper( *args, **kwargs ):
   old_server_state = handlers._server_state
   app = SetUpApp( custom_options )
   try:
     app.post_json(
       '/ignore_extra_conf_file',
       { 'filepath': PathToTestFile( '.ycm_extra_conf.py' ) } )
     test( app, *args, **kwargs )
   finally:
     handlers._server_state = old_server_state
Example #5
0
def setUpPackage():
    """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
    global shared_app

    shared_app = SetUpApp()
    shared_app.post_json('/ignore_extra_conf_file',
                         {'filepath': PathToTestFile('.ycm_extra_conf.py')})
Example #6
0
    def Wrapper(*args, **kwargs):
        old_server_state = handlers._server_state

        try:
            test(SetUpApp(), *args, **kwargs)
        finally:
            handlers._server_state = old_server_state
Example #7
0
 def Wrapper( *args, **kwargs ):
   old_server_state = handlers._server_state
   app = SetUpApp( custom_options )
   try:
     test( app, *args, **kwargs )
   finally:
     handlers._server_state = old_server_state
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartGoCompleterServerInDirectory(shared_app, PathToTestFile())
    yield
    StopCompleterServer(shared_app, 'go')
Example #9
0
def setUpModule():
    global shared_app
    with patch('ycmd.completers.javascript.hook.'
               'ShouldEnableTernCompleter',
               return_value=False):
        shared_app = SetUpApp()
        WaitUntilCompleterServerReady(shared_app, 'javascriptreact')
Example #10
0
def setup_module():
    """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
    global shared_app
    shared_app = SetUpApp()
    StartJavaScriptCompleterServerInDirectory(shared_app, PathToTestFile())
Example #11
0
 def Wrapper(*args, **kwargs):
     old_server_state = handlers._server_state
     app = SetUpApp(custom_options)
     try:
         test(app, *args, **kwargs)
     finally:
         StopCompleterServer(app, 'rust')
         handlers._server_state = old_server_state
Example #12
0
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartRustCompleterServerInDirectory(shared_app,
                                            PathToTestFile('common', 'src'))
    yield
    StopCompleterServer(shared_app, 'rust')
Example #13
0
 def Wrapper( *args, **kwargs ):
   old_server_state = handlers._server_state
   app = SetUpApp()
   try:
     test( app, *args, **kwargs )
   finally:
     StopCompleterServer( app, 'typescript' )
     handlers._server_state = old_server_state
Example #14
0
def setUpPackage():
    """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
    global shared_app

    shared_app = SetUpApp()
Example #15
0
 def Wrapper(*args, **kwargs):
     old_server_state = handlers._server_state
     app = SetUpApp()
     try:
         with CurrentWorkingDirectory(directory):
             test(app, *args, **kwargs)
     finally:
         StopCompleterServer(app, 'javascript')
         handlers._server_state = old_server_state
Example #16
0
def SharedYcmd( test ):
  global shared_app
  if shared_app is None:
    shared_app = SetUpApp()

  @functools.wraps( test )
  def Wrapper( test_case_instance, *args, **kwargs ):
    ClearCompletionsCache()
    return test( test_case_instance, shared_app, *args, **kwargs )
  return Wrapper
Example #17
0
    def Wrapper(*args, **kwargs):
        old_server_state = handlers._server_state

        try:
            app = SetUpApp()
            WaitUntilRacerdServerReady(app)
            test(app, *args, **kwargs)
            StopRacerdServer(app)
        finally:
            handlers._server_state = old_server_state
Example #18
0
def setUpPackage():
    """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
    global shared_app

    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartGoCompleterServerInDirectory(shared_app, PathToTestFile())
Example #19
0
 def Wrapper(*args, **kwargs):
     old_server_state = handlers._server_state
     old_current_dir = os.getcwd()
     app = SetUpApp()
     os.chdir(PathToTestFile())
     try:
         test(app, *args, **kwargs)
     finally:
         StopCompleterServer(app, 'javascript')
         os.chdir(old_current_dir)
         handlers._server_state = old_server_state
Example #20
0
def setUpPackage():
    """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
    global shared_app, shared_current_dir

    shared_app = SetUpApp()
    shared_current_dir = GetCurrentDirectory()
    os.chdir(PathToTestFile())
    WaitUntilCompleterServerReady(shared_app, 'javascript')
Example #21
0
def setUpPackage():
  """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
  global shared_app

  with patch( 'ycmd.completers.javascript.hook.'
              'ShouldEnableTernCompleter', return_value = False ):
    shared_app = SetUpApp()
    WaitUntilCompleterServerReady( shared_app, 'javascript' )
Example #22
0
def setUpPackage():
  """Initializes the ycmd server as a WebTest application that will be shared
  by all tests using the SharedYcmd decorator in this package. Additional
  configuration that is common to these tests, like starting a semantic
  subserver, should be done here."""
  global shared_app

  shared_app = SetUpApp()
  # By default, we use the eclipse project for convenience. This means we don't
  # have to @IsolatedYcmdInDirectory( DEFAULT_PROJECT_DIR ) for every test
  StartJavaCompleterServerInDirectory( shared_app,
                                       PathToTestFile( DEFAULT_PROJECT_DIR ) )
Example #23
0
  def Wrapper( *args, **kwargs ):
    old_server_state = handlers._server_state
    old_current_dir = os.getcwd()

    try:
      os.chdir( PathToTestFile() )
      app = SetUpApp()
      WaitUntilTernServerReady( app )
      test( app, *args, **kwargs )
      StopTernServer( app )
    finally:
      os.chdir( old_current_dir )
      handlers._server_state = old_server_state
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
Example #25
0
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
Example #26
0
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
    yield
    StopCompleterServer(shared_app, 'cpp')
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp({'use_clangd': 0})
Example #28
0
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
    StartJavaScriptCompleterServerInDirectory(shared_app, PathToTestFile())
Example #29
0
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartRustCompleterServerInDirectory(shared_app,
                                            PathToTestFile('common'))
def set_up_shared_app():
    global shared_app, shared_filepaths
    shared_app = SetUpApp()
    yield
    for filepath in shared_filepaths.get(shared_app, []):
        StopCompleterServer(shared_app, 'cs', filepath)
Example #31
0
def setUpModule():
    global shared_app
    shared_app = SetUpApp({'use_clangd': 0})
Example #32
0
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartJavaCompleterServerInDirectory(
            shared_app, PathToTestFile(DEFAULT_PROJECT_DIR))
Example #33
0
def setup_module():
  global shared_app, shared_filepaths
  shared_app = SetUpApp()