summaryrefslogtreecommitdiff
path: root/src/testdir/test_python3.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-30 21:57:11 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-30 21:57:11 +0100
commit145d1fd91041bd2a22a11eef0357702e420796e2 (patch)
tree852bd5f3bb1de6e8db64d1e84431d16e5cd1ebdd /src/testdir/test_python3.vim
parentcfb4d4f312e740c2fbb70c29c47cf74a76f8b605 (diff)
downloadvim-git-145d1fd91041bd2a22a11eef0357702e420796e2.tar.gz
patch 9.0.0631: too many delete() calls in testsv9.0.0631
Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
Diffstat (limited to 'src/testdir/test_python3.vim')
-rw-r--r--src/testdir/test_python3.vim7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/testdir/test_python3.vim b/src/testdir/test_python3.vim
index 58082278c..56d20796a 100644
--- a/src/testdir/test_python3.vim
+++ b/src/testdir/test_python3.vim
@@ -4044,7 +4044,7 @@ func Test_python3_fold_hidden_buffer()
endfunc
call setline(1, repeat([''], 15) + repeat(['from'], 3))
- eval repeat(['x'], 17)->writefile('Xa.txt')
+ eval repeat(['x'], 17)->writefile('Xa.txt', 'D')
split Xa.txt
py3 import vim
py3 b = vim.current.buffer
@@ -4052,7 +4052,6 @@ func Test_python3_fold_hidden_buffer()
hide
py3 b[:] = aaa
- call delete('Xa.txt')
set fdm& fde&
delfunc Fde
bwipe! Xa.txt
@@ -4078,7 +4077,7 @@ func Test_python3_hidden_buf_mod_does_not_mess_up_display()
norm! Gzb
call feedkeys(":call Func()\r", 'n')
END
- call writefile(lines, testfile)
+ call writefile(lines, testfile, 'D')
let rows = 10
let bufnr = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows})
@@ -4090,8 +4089,8 @@ func Test_python3_hidden_buf_mod_does_not_mess_up_display()
call term_sendkeys(bufnr, ":qall!\<CR>")
call WaitForAssert({-> assert_equal('dead', job_status(term_getjob(bufnr)))})
+
exe bufnr . 'bwipe!'
- call delete(testfile)
endfunc
" vim: shiftwidth=2 sts=2 expandtab