diff options
Diffstat (limited to 'tests/test_ext_napoleon_docstring.py')
-rw-r--r-- | tests/test_ext_napoleon_docstring.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_ext_napoleon_docstring.py b/tests/test_ext_napoleon_docstring.py index f0399a894..21278dbca 100644 --- a/tests/test_ext_napoleon_docstring.py +++ b/tests/test_ext_napoleon_docstring.py @@ -483,6 +483,22 @@ Attributes: :type: numpy.ndarray """ + + def test_attributes_with_use_ivar(self): + docstring = """\ +Attributes: + foo (int): blah blah + bar (str): blah blah +""" + + config = Config(napoleon_use_ivar=True) + actual = str(GoogleDocstring(docstring, config, obj=self.__class__)) + expected = """\ +:ivar foo: blah blah +:vartype foo: int +:ivar bar: blah blah +:vartype bar: str +""" self.assertEqual(expected, actual) def test_code_block_in_returns_section(self): |