Skip to content

tests: unify exec framework #243

Description

@casperdcl

Merge any test using Bash.compgen/zsh_spec_array/fish_candidates/tcsh_candidates into a parameteri[sz]ed test.

e.g. replace test_fish_file_completion(change_dir, test_parser) with:

exec_candidates = {'zsh': zsh_spec_array, 'fish': fish_candidates, 'tcsh': tcsh_candidates, ...}
exec_shell = pytest.mark.parametrize('shell', list(exec_candidates))

@exec_shell
test_file_completion(shell, change_dir, test_parser):
    (change_dir / "test_file.txt").touch()
    completion = shtab.complete(test_parser, shell)
    assert ... in exec_candidates[shell](completion, ...)
    ...

also misc tidy, e.g.:

/CC @ThomasWaldmann

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttechnical-debtRefactoring, linting & tidyingtestingUnit tests & debugging

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions