1 " Nose-compatible test name preparer
2 " Maintainer: Sergey Matveev <stargrave@stargrave.org>
3 " License: GNU General Public License version 3 of the License or later
5 " When standing inside TestCase's test method, type <leader>t and full
6 " Python (your.project.tests:TestCaseName.test_method_name) path will be
7 " copied to clipboard ("*) register.
11 normal ?.*\s*def .*[Tt]est
\r
15 let postfix = @" . "." . postfix
17 let base = join([""] + split(getcwd(), "/")[:-1], "/")
18 let prefix = substitute(expand("%:p:r")[len(base)+1:], "/", ".", "g")
19 let name = prefix . ":" . postfix
24 nmap <leader>t :call TestName()<CR>