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
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")})
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
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
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')})
def Wrapper(*args, **kwargs): old_server_state = handlers._server_state try: test(SetUpApp(), *args, **kwargs) finally: handlers._server_state = old_server_state
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')
def setUpModule(): global shared_app with patch('ycmd.completers.javascript.hook.' 'ShouldEnableTernCompleter', return_value=False): shared_app = SetUpApp() WaitUntilCompleterServerReady(shared_app, 'javascriptreact')
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())
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
def set_up_shared_app(): global shared_app shared_app = SetUpApp() with IgnoreExtraConfOutsideTestsFolder(): StartRustCompleterServerInDirectory(shared_app, PathToTestFile('common', 'src')) yield StopCompleterServer(shared_app, 'rust')
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
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()
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
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
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
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())
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
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')
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' )
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 ) )
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()
def setUpModule(): global shared_app shared_app = SetUpApp()
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})
def setUpModule(): global shared_app shared_app = SetUpApp() StartJavaScriptCompleterServerInDirectory(shared_app, PathToTestFile())
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)
def setUpModule(): global shared_app shared_app = SetUpApp({'use_clangd': 0})
def setUpModule(): global shared_app shared_app = SetUpApp() with IgnoreExtraConfOutsideTestsFolder(): StartJavaCompleterServerInDirectory( shared_app, PathToTestFile(DEFAULT_PROJECT_DIR))
def setup_module(): global shared_app, shared_filepaths shared_app = SetUpApp()