diff options
Diffstat (limited to 'test')
4 files changed, 7 insertions, 0 deletions
diff --git a/test/linter/test_pyre.vader b/test/linter/test_pyre.vader index 335e31f2..53f84e6f 100644 --- a/test/linter/test_pyre.vader +++ b/test/linter/test_pyre.vader @@ -57,3 +57,10 @@ Execute(Poetry is detected when python_pyre_auto_poetry is set): AssertLinter 'poetry', \ ale#Escape('poetry') . ' run pyre persistent' + +Execute(The FindProjectRoot should detect the project root directory for namespace package via .pyre_configuration.local): + silent execute 'file ' . fnameescape(g:dir . '/../test-files/python/pyre_configuration_dir/foo/bar.py') + + AssertEqual + \ ale#path#Simplify(g:dir . '/../test-files/python/pyre_configuration_dir'), + \ ale#python#FindProjectRoot(bufnr('')) diff --git a/test/test-files/python/pyre_configuration_dir/.pyre_configuration.local b/test/test-files/python/pyre_configuration_dir/.pyre_configuration.local new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test-files/python/pyre_configuration_dir/.pyre_configuration.local diff --git a/test/test-files/python/pyre_configuration_dir/foo/__init__.py b/test/test-files/python/pyre_configuration_dir/foo/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test-files/python/pyre_configuration_dir/foo/__init__.py diff --git a/test/test-files/python/pyre_configuration_dir/foo/bar.py b/test/test-files/python/pyre_configuration_dir/foo/bar.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/test/test-files/python/pyre_configuration_dir/foo/bar.py |