Logo
Explore Help
Register Sign In
vim/YouCompleteMe
1
0
Fork 0
You've already forked YouCompleteMe
Code Issues Pull Requests Releases Wiki Activity
YouCompleteMe/python/ycm/tests/__init__.py

2 lines
1 B
Raw Normal View History

Support subcommands which return detailed info We display the detailed info text in the preview window. Vim's preview window is designed to display actual files, not scratch data. Our approach is to open a temporary file, even though that file is never written. This way, all of Vim's existing settings for the preview window (and people's configured mappings) just work. This is also consistent with showing the documentation in the preview window during completion. Other plugins have more complicated functions for this (such as eclim), or Scratch.vim, but this approach is simple and doesn't require external dependencies or additional settings. Tests: This required fixing a sort-of-bug in which the mock'd Vim module was always only set once, and could not be changed outside of the module which created it. This meant that it wasn't easy to have arbitrary tests, because it was dependent on the order in which the tests execute as to whether the return from MockVimModule() was actually the one in use. The solution was to make the mock'd vim module a singleton, and use mock's patch decorator to assign new MagicMock() instances to those methods in the vim module which a particular test is interested in.
2015-09-06 20:07:42 +01:00
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.1 Page: 16ms Template: 0ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API