forked from python-mode/python-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpymoderun.vim
More file actions
34 lines (26 loc) · 714 Bytes
/
pymoderun.vim
File metadata and controls
34 lines (26 loc) · 714 Bytes
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
32
33
34
" Test that the PymodeLintAuto changes a badly formated buffer.
" Load sample python file.
read ./test_python_sample_code/pymoderun_sample.py
" Delete the first line (which is not present in the original file) and save
" loaded file.
execute "normal! gg"
execute "normal! dd"
noautocmd write!
" Allow switching to windows with buffer command.
let s:curr_buffer = bufname("%")
set switchbuf+=useopen
" Change the buffer.
PymodeRun
write!
let run_buffer = bufname("run")
execute "buffer " . run_buffer
" Assert changes.
" There exists a buffer.
call assert_true(len(run_buffer) > 0)
" This buffer has more than five lines.
call assert_true(line('$') > 5)
if len(v:errors) > 0
cquit!
else
quit!
endif