Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iknox-fa committed Aug 11, 2022
1 parent 61650ca commit 4214726
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from dbt.cli.main import cli
import click


class TestCLI:
def test_commands_have_docstrings(self):
def run_test(commands):
for _, command in commands.items():
if type(command) is click.core.Command:
assert command.__doc__ is not None
if type(command) is click.core.Group:
run_test(command.commands)

run_test(cli.commands)

def test_params_have_help_texts(self):
def run_test(commands):
for _, command in commands.items():
if type(command) is click.core.Command:
for param in command.params:
assert param.help is not None
if type(command) is click.core.Group:
run_test(command.commands)

run_test(cli.commands)

0 comments on commit 4214726

Please sign in to comment.