File: documentation.vim

package info (click to toggle)
python-jedi 0.10.0~git1%2Bf05c071-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,064 kB
  • ctags: 3,014
  • sloc: python: 16,997; makefile: 149; ansic: 13
file content (31 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
source plugin/jedi.vim

describe 'documentation docstrings'
    before
        set filetype=python
    end

    after
        bd!
        bd!
    end

    it 'simple'
        put = 'ImportError'
        normal GK
        Expect bufname('%') == "'__doc__'"
        Expect &filetype == 'rst'
        let content = join(getline(1,'$'), "\n")
        Expect stridx(content, "Import can't find module") > 0
        normal K
        Expect bufname('%') == ''
    end

    it 'no documentation'
        put = 'x = 2'
        normal o<ESC>GK
        Expect bufname('%') == ''
    end
end

" vim: et:ts=4:sw=4