Skip to content

Commit

Permalink
tests: Add docstrings
Browse files Browse the repository at this point in the history
Took me a moment to figure out how I'd broken these tests up.

Signed-off-by: Stephen Finucane <stephen@that.guru>
  • Loading branch information
stephenfin committed Jul 23, 2020
1 parent f066122 commit d90b576
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/test_formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@


class CommandTestCase(unittest.TestCase):
"""Validate basic ``click.Command`` instances."""

def test_no_parameters(self):
"""Validate a `click.Command` with no parameters.
Expand Down Expand Up @@ -110,8 +112,7 @@ def foobar(bar):
'Allowing show_default to be a string was added in Click 7.0',
)
def test_defaults(self):
"""Validate formatting of user documented defaults.
"""
"""Validate formatting of user documented defaults."""

@click.command()
@click.option('--num-param', type=int, default=42, show_default=True)
Expand Down Expand Up @@ -215,6 +216,8 @@ def hello(name):


class GroupTestCase(unittest.TestCase):
"""Validate basic ``click.Group`` instances."""

def test_no_parameters(self):
"""Validate a `click.Group` with no parameters.
Expand Down Expand Up @@ -349,6 +352,8 @@ def cli():


class NestedCommandsTestCase(unittest.TestCase):
"""Validate ``click.Command`` instances inside ``click.Group`` instances."""

@staticmethod
def _get_ctx():
@click.group()
Expand Down Expand Up @@ -417,6 +422,8 @@ def test_show_nested(self):


class CommandFilterTestCase(unittest.TestCase):
"""Validate filtering of commands."""

@staticmethod
def _get_ctx():
@click.group()
Expand Down Expand Up @@ -487,6 +494,8 @@ def test_order_of_commands(self):


class CustomMultiCommandTestCase(unittest.TestCase):
"""Validate ``click.MultiCommand`` instances."""

def test_basics(self):
"""Validate a custom ``click.MultiCommand`` with no parameters.
Expand Down

0 comments on commit d90b576

Please sign in to comment.