Skip to content
Myr

test_parser.py

This file

Path

tests/test_parser.py

17 lines · 436 bytes · Python

Last changed by

Merge pull request #1709 from SamSchott/shell-completion-espace-handlingDavid Lordbefore adoption9d8ad23

History of this file

Take it

Merge pull request #1709 from SamSchott/shell-completion-espace-handlingDavid Lordbefore adoption9d8ad23

lines 1–17why, one step back
1import pytest
23from click.parser import split_arg_string456@pytest.mark.parametrize(7 ("value", "expect"),8 [9 ("cli a b c", ["cli", "a", "b", "c"]),10 ("cli 'my file", ["cli", "my file"]),11 ("cli 'my file'", ["cli", "my file"]),12 ("cli my\\", ["cli", "my"]),13 ("cli my\\ file", ["cli", "my file"]),14 ],15)16def test_split_arg_string(value, expect):17 assert split_arg_string(value) == expect