alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
274 stars 39 forks source link

"function" is missing from autocompletion #17

Closed brettc closed 10 years ago

brettc commented 10 years ago

You can specify "Pytest function", but it isn't in the autocompletions. The following works for me...

--- a/ftplugin/python/pytest.vim
+++ b/ftplugin/python/pytest.vim
@@ -941,7 +941,7 @@ endfunction

 function! s:Completion(ArgLead, CmdLine, CursorPos)
     let result_order = "first\nlast\nnext\nprevious\n"
-    let test_objects = "class\nmethod\nfile\nproject\nprojecttestwd\n"
+    let test_objects = "function\nclass\nmethod\nfile\nproject\nprojecttestwd\n"
     let optional     = "verbose\nlooponfail\nclear\n"
     let reports      = "fails\nerror\nsession\nend\n"
     let pyversion    = "version\n"
alfredodeza commented 10 years ago

Good catch! Can you send a pull request with this change so I can merge it?

brettc commented 10 years ago

I could, but as the diff above shows -- it is one-line change. It might be quicker for us both for you to just do it...

alfredodeza commented 10 years ago

Fixed in 7870e76