]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/fixers/test_pyflyby_fixer_callback.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit 'a39f715c13be3352193ffd9c5b7536b8786eff64' as '.vim/bundle/vim-lsp'
[etc/vim.git] / .vim / bundle / ale / test / fixers / test_pyflyby_fixer_callback.vader
1 Before:
2   call ale#assert#SetUpFixerTest('python', 'pyflyby')
3
4   let b:bin_dir = has('win32') ? 'Scripts' : 'bin'
5
6 After:
7   call ale#assert#TearDownFixerTest()
8
9   unlet! b:bin_dir
10
11 Execute(The pyflyby callback should return the correct default values):
12   call ale#test#SetFilename('../test-files/python/with_virtualenv/subdir/foo/bar.py')
13
14   AssertFixer
15   \ {
16   \   'command': ale#Escape(ale#path#Simplify(g:dir . '/../test-files/python/with_virtualenv/env/' . b:bin_dir . '/tidy-imports')),
17   \ }
18
19 Execute(Pipenv is detected when python_pyflyby_auto_pipenv is set):
20   let g:ale_python_pyflyby_auto_pipenv = 1
21
22   call ale#test#SetFilename('../test-files/python/pipenv/whatever.py')
23
24   AssertFixer
25   \ {
26   \   'command': ale#Escape('pipenv') . ' run tidy-imports'
27   \ }
28
29 Execute(Poetry is detected when python_pyflyby_auto_poetry is set):
30   let g:ale_python_pyflyby_auto_poetry = 1
31
32   call ale#test#SetFilename('../test-files/python/poetry/whatever.py')
33
34   GivenCommandOutput ['VERSION 5.7.0']
35   AssertFixer
36   \ {
37   \   'command': ale#Escape('poetry') . ' run tidy-imports'
38   \ }
39
40 Execute(uv is detected when python_pyflyby_auto_uv is set):
41   let g:ale_python_pyflyby_auto_uv = 1
42
43   call ale#test#SetFilename('../test-files/python/uv/whatever.py')
44
45   GivenCommandOutput ['VERSION 5.7.0']
46   AssertFixer
47   \ {
48   \   'command': ale#Escape('uv') . ' run tidy-imports'
49   \ }