Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help: support multiple examples #1403

Merged
merged 3 commits into from
Apr 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: update loader tests for examples
The loader didn't *have* tests when work on supporting multiple help
examples started. Rebasing was fun because of that.
  • Loading branch information
dgw committed Apr 17, 2019
commit d212aafa24a8660ba4c85a378bf8755de843f6ca
12 changes: 6 additions & 6 deletions test/test_loader.py
Original file line number Diff line number Diff line change
@@ -323,7 +323,7 @@ def test_clean_callable_example(tmpconfig, func):
docs = func._docs['test']
assert len(docs) == 2
assert docs[0] == inspect.cleandoc(func.__doc__).splitlines()
assert docs[1] == '.test hello'
assert docs[1] == ['.test hello']


def test_clean_callable_example_multi_commands(tmpconfig, func):
@@ -344,7 +344,7 @@ def test_clean_callable_example_multi_commands(tmpconfig, func):
assert test_docs == unit_docs

assert test_docs[0] == inspect.cleandoc(func.__doc__).splitlines()
assert test_docs[1] == '.test hello'
assert test_docs[1] == ['.test hello']


def test_clean_callable_example_first_only(tmpconfig, func):
@@ -360,7 +360,7 @@ def test_clean_callable_example_first_only(tmpconfig, func):
docs = func._docs['test']
assert len(docs) == 2
assert docs[0] == inspect.cleandoc(func.__doc__).splitlines()
assert docs[1] == '.test hello'
assert docs[1] == ['.test hello']


def test_clean_callable_example_first_only_multi_commands(tmpconfig, func):
@@ -382,7 +382,7 @@ def test_clean_callable_example_first_only_multi_commands(tmpconfig, func):
assert test_docs == unit_docs

assert test_docs[0] == inspect.cleandoc(func.__doc__).splitlines()
assert test_docs[1] == '.test hello'
assert test_docs[1] == ['.test hello']


def test_clean_callable_example_default_prefix(tmpconfig, func):
@@ -398,7 +398,7 @@ def test_clean_callable_example_default_prefix(tmpconfig, func):
docs = func._docs['test']
assert len(docs) == 2
assert docs[0] == inspect.cleandoc(func.__doc__).splitlines()
assert docs[1] == '!test hello'
assert docs[1] == ['!test hello']


def test_clean_callable_example_nickname(tmpconfig, func):
@@ -413,7 +413,7 @@ def test_clean_callable_example_nickname(tmpconfig, func):
docs = func._docs['test']
assert len(docs) == 2
assert docs[0] == inspect.cleandoc(func.__doc__).splitlines()
assert docs[1] == 'TestBot: hello'
assert docs[1] == ['TestBot: hello']


def test_clean_callable_intents(tmpconfig, func):