forked from python-mode/python-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautopep8.vim
More file actions
34 lines (27 loc) · 698 Bytes
/
autopep8.vim
File metadata and controls
34 lines (27 loc) · 698 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/from_autopep8.py
" Load auxiliary code.
source ./test_helpers_vimscript/md5sum.vim
" Delete the first line (which is not present in the original file) and save
" loaded file.
execute "normal! gg"
execute "normal! dd"
noautocmd write!
" Get original md5sum for script.
call Md5()
let s:md5orig = b:calculated_md5
unlet b:calculated_md5
" Change the buffer.
PymodeLintAuto
write!
" Get different md5sum for script.
call Md5()
let s:md5mod = b:calculated_md5
" Assert changes.
call assert_notequal(s:md5orig, s:md5mod)
if len(v:errors) > 0
cquit!
else
quit!
endif