summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric N. Vander Weele <ericvw@gmail.com>2019-05-18 09:42:19 -0400
committerEric N. Vander Weele <ericvw@gmail.com>2019-05-19 09:51:26 -0400
commit57b9d8bc0ed71639a666d81f916515a1439d6aeb (patch)
tree19763c6be996be7acbb50ffa017af6feb53091cd /test
parent652d991077ac3261e51abfa51d979774a555b405 (diff)
downloadale-57b9d8bc0ed71639a666d81f916515a1439d6aeb.zip
Test for Python project root directory
Add test files and a new test suite for detecting a Python project's root directory.
Diffstat (limited to 'test')
-rw-r--r--test/python-test-files/python-package-project/.flake80
-rw-r--r--test/python-test-files/python-package-project/package-name/module.py0
-rw-r--r--test/test_python_find_project_root.vader11
3 files changed, 11 insertions, 0 deletions
diff --git a/test/python-test-files/python-package-project/.flake8 b/test/python-test-files/python-package-project/.flake8
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/python-test-files/python-package-project/.flake8
diff --git a/test/python-test-files/python-package-project/package-name/module.py b/test/python-test-files/python-package-project/package-name/module.py
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/test/python-test-files/python-package-project/package-name/module.py
diff --git a/test/test_python_find_project_root.vader b/test/test_python_find_project_root.vader
new file mode 100644
index 00000000..176e819a
--- /dev/null
+++ b/test/test_python_find_project_root.vader
@@ -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(''))