Skip to content

Commit

Permalink
move the GoogleDocstring test to the appropriate test class
Browse files Browse the repository at this point in the history
  • Loading branch information
keewis committed Aug 4, 2020
1 parent 278a057 commit 2c75aaa
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tests/test_ext_napoleon_docstring.py
Expand Up @@ -1078,6 +1078,22 @@ def test_noindex(self):
options={'noindex': True}))
self.assertEqual(expected, actual)

def test_keywords_with_types(self):
docstring = """\
Do as you please
Keyword Args:
gotham_is_yours (None): shall interfere.
"""
actual = str(GoogleDocstring(docstring))
expected = """\
Do as you please
:keyword gotham_is_yours: shall interfere.
:kwtype gotham_is_yours: None
"""
self.assertEqual(expected, actual)


class NumpyDocstringTest(BaseDocstringTest):
docstrings = [(
Expand Down Expand Up @@ -2191,22 +2207,6 @@ def test_parameter_types(self):
actual = str(NumpyDocstring(docstring, config))
self.assertEqual(expected, actual)

def test_keywords_with_types(self):
docstring = """\
Do as you please
Keyword Args:
gotham_is_yours (None): shall interfere.
"""
actual = str(GoogleDocstring(docstring))
expected = """\
Do as you please
:keyword gotham_is_yours: shall interfere.
:kwtype gotham_is_yours: None
"""
self.assertEqual(expected, actual)

@contextmanager
def warns(warning, match):
match_re = re.compile(match)
Expand Down

0 comments on commit 2c75aaa

Please sign in to comment.