Skip to content

Commit 2051d5f

Browse files
theazureshadowauvipy
authored andcommitted
Update tests to expect hyphens
Click now converts underscores to hyphens in command names, so update test expectations to match.
1 parent 3289114 commit 2051d5f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/test_argument.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ def arg_cmd():
1414
pass
1515

1616
c = ClickCompleter(root_command)
17-
completions = list(c.get_completions(Document(u"arg_cmd ")))
17+
completions = list(c.get_completions(Document(u"arg-cmd ")))
1818

1919
assert set(x.text for x in completions) == set([u"foo", u"bar"])

tests/test_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def second_level_command_two():
2121
pass
2222

2323
c = ClickCompleter(root_command)
24-
completions = list(c.get_completions(Document(u"first_level_command ")))
24+
completions = list(c.get_completions(Document(u"first-level-command ")))
2525

2626
assert set(x.text for x in completions) == set(
27-
[u"second_level_command_one", u"second_level_command_two"]
27+
[u"second-level-command-one", u"second-level-command-two"]
2828
)

tests/test_command_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ def foobar_cmd():
2424
c = ClickCompleter(click.CommandCollection(sources=[foo_group, foobar_group]))
2525
completions = list(c.get_completions(Document(u"foo")))
2626

27-
assert set(x.text for x in completions) == set([u"foo_cmd", u"foobar_cmd"])
27+
assert set(x.text for x in completions) == set([u"foo-cmd", u"foobar-cmd"])

0 commit comments

Comments
 (0)