def test_defaults(self):
     parser = DocstringParser(docstring_multi_complex_type)
     # the docstring parser adds "..." for keyword-arguments
     # to signify they are optional
     assert parser.default_for("country_hint") == "..."
     # for "everything else" we don't set a default from the docstring
     # instead we will seek the default from the signature inspection
     assert parser.default_for("documents") is None
 def test_docstring_defaults_legacy(self):
     parser = DocstringParser(docstring_default_legacy)
     assert parser.default_for("value") == "cat"
     assert parser.default_for("another") == "dog"
     assert parser.default_for(
         "some_class") == ":py:class:`apistubgen.test.models.FakeObject`"
 def test_defaults(self):
     parser = DocstringParser(docstring_multi_complex_type)
     # optional keyword-arguments are documented with "..."
     assert parser.default_for("country_hint") == "..."
     assert parser.default_for("documents") == None