Test for Python project root directory

Add test files and a new test suite for detecting a Python project's
root directory.
This commit is contained in:
Eric N. Vander Weele 2019-05-18 09:42:19 -04:00
parent 652d991077
commit 57b9d8bc0e
3 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,11 @@
Before:
call ale#test#SetDirectory('/testplugin/test')
After:
call ale#test#RestoreDirectory()
Execute(Detect root of Python project with .flake8 correctly):
call ale#test#SetFilename('python-test-files/python-package-project/package-name/module.py')
AssertEqual
\ ale#path#Simplify(g:dir . '/python-test-files/python-package-project'),
\ ale#python#FindProjectRoot(bufnr(''))