MCPcopy Create free account
hub / github.com/ycm-core/YouCompleteMe / youcompleteme_instance

Function youcompleteme_instance

python/ycm/tests/__init__.py:138–149  ·  view source on GitHub ↗

Defines a context manager to be used in case a shared YCM state between subtests is to be avoided, as could be the case with completion caching.

( custom_options = {} )

Source from the content-addressed store, hash-verified

136
137@contextlib.contextmanager
138def youcompleteme_instance( custom_options = {} ):
139 """Defines a context manager to be used in case a shared YCM state
140 between subtests is to be avoided, as could be the case with completion
141 caching."""
142 with UserOptions( custom_options ):
143 ycm = YouCompleteMe()
144 WaitUntilReady()
145 try:
146 test_utils.VIM_PROPS_FOR_BUFFER.clear()
147 yield ycm
148 finally:
149 StopServer( ycm )

Calls 4

YouCompleteMeClass · 0.90
UserOptionsFunction · 0.85
WaitUntilReadyFunction · 0.85
StopServerFunction · 0.85