예제 #1
0
파일: __init__.py 프로젝트: vheon/ycmd
    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
예제 #2
0
파일: __init__.py 프로젝트: vheon/ycmd
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")})
예제 #3
0
파일: __init__.py 프로젝트: yulei/ycmd
    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
예제 #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
예제 #5
0
파일: __init__.py 프로젝트: yulei/ycmd
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')})
예제 #6
0
파일: __init__.py 프로젝트: yulei/ycmd
    def Wrapper(*args, **kwargs):
        old_server_state = handlers._server_state

        try:
            test(SetUpApp(), *args, **kwargs)
        finally:
            handlers._server_state = old_server_state
예제 #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
예제 #8
0
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartGoCompleterServerInDirectory(shared_app, PathToTestFile())
    yield
    StopCompleterServer(shared_app, 'go')
예제 #9
0
def setUpModule():
    global shared_app
    with patch('ycmd.completers.javascript.hook.'
               'ShouldEnableTernCompleter',
               return_value=False):
        shared_app = SetUpApp()
        WaitUntilCompleterServerReady(shared_app, 'javascriptreact')
예제 #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())
예제 #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
예제 #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')
예제 #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
예제 #14
0
파일: __init__.py 프로젝트: j-carl/ycmd
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()
예제 #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
예제 #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
예제 #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
예제 #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())
예제 #19
0
파일: __init__.py 프로젝트: tianser/vim
 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
예제 #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')
예제 #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' )
예제 #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 ) )
예제 #23
0
파일: __init__.py 프로젝트: yulei/ycmd
  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
예제 #24
0
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
예제 #25
0
파일: __init__.py 프로젝트: wooloow/ycmd
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
예제 #26
0
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp()
    yield
    StopCompleterServer(shared_app, 'cpp')
예제 #27
0
def set_up_shared_app():
    global shared_app
    shared_app = SetUpApp({'use_clangd': 0})
예제 #28
0
파일: __init__.py 프로젝트: wooloow/ycmd
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
    StartJavaScriptCompleterServerInDirectory(shared_app, PathToTestFile())
예제 #29
0
파일: __init__.py 프로젝트: wooloow/ycmd
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartRustCompleterServerInDirectory(shared_app,
                                            PathToTestFile('common'))
예제 #30
0
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)
예제 #31
0
파일: __init__.py 프로젝트: wooloow/ycmd
def setUpModule():
    global shared_app
    shared_app = SetUpApp({'use_clangd': 0})
예제 #32
0
파일: __init__.py 프로젝트: wooloow/ycmd
def setUpModule():
    global shared_app
    shared_app = SetUpApp()
    with IgnoreExtraConfOutsideTestsFolder():
        StartJavaCompleterServerInDirectory(
            shared_app, PathToTestFile(DEFAULT_PROJECT_DIR))
예제 #33
0
def setup_module():
  global shared_app, shared_filepaths
  shared_app = SetUpApp()