Update nvim ALE config

This commit is contained in:
Andrejus
2020-09-28 14:30:37 +01:00
parent 71dd4e58dc
commit 4f757401f1
6 changed files with 92 additions and 48 deletions

View File

@@ -8,15 +8,16 @@ from subprocess import run, CalledProcessError
import pytest
# ---------------------------------------------------------------------------- #
# Helper functions
# ---------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #
# Helper functions
# --------------------------------------------------------------------------- #
def in_path(binary: str) -> bool:
"""
Helper function to check whether `binary` is in PATH.
"""
return find_executable(binary) is not None
def in_shell_path(shell: str, binary: str) -> bool:
"""
Helper function to check whether `binary` is in interactive shell's PATH.
@@ -29,11 +30,13 @@ def in_shell_path(shell: str, binary: str) -> bool:
return False
# ---------------------------------------------------------------------------- #
# Test fixtures
# ---------------------------------------------------------------------------- #
# --------------------------------------------------------------------------- #
# Test fixtures
# --------------------------------------------------------------------------- #
shells: List[str] = [
'sh', 'bash', 'fish',
'sh',
'bash',
'fish',
]
binaries: List[str] = [
@@ -42,16 +45,27 @@ binaries: List[str] = [
*shells,
# tools
"git", "nvim",
"firebase", "aws", "terraform",
"docker", "docker-compose",
"git",
"nvim",
"firebase",
"aws",
"terraform",
"docker",
"docker-compose",
"screenfetch",
# language: python
"pyenv", "python3", "pip3", "poetry",
"pyenv",
"python3",
"pip3",
"poetry",
# langauge: js
"nvm", "node", "npm", "yarn", "elm",
"nvm",
"node",
"npm",
"yarn",
"elm",
]
@@ -63,6 +77,7 @@ def test_shells(shell: str):
""" Assert all shells we expect are in PATH. """
assert in_path(shell)
@pytest.mark.parametrize("binary", binaries)
@pytest.mark.parametrize("shell", shells)
def test_binaries(shell: str, binary: str):