diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index 61bc295..d54d8cd 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -1,7 +1,7 @@ - +# this package from attr_utils.annotations import AttrsClass from attr_utils.autoattrs import AttrsDocumenter def test_can_document(): - assert AttrsDocumenter.can_document_member(AttrsClass, None, None, None) + assert AttrsDocumenter.can_document_member(AttrsClass, "AttrsClass", False, None) diff --git a/tests/test_docstrings.py b/tests/test_docstrings.py index 11560df..85c8b59 100644 --- a/tests/test_docstrings.py +++ b/tests/test_docstrings.py @@ -34,7 +34,10 @@ def test_add_attrs_doc(): assert SomeClass.__gt__.__doc__ == doc assert SomeClass.__lt__.__doc__ == doc assert SomeClass.__le__.__doc__ == doc - assert SomeClass.__ne__.__doc__ == "\n Check equality and either forward a NotImplemented or return the result\n negated.\n " + assert SomeClass.__ne__.__doc__ in { + "Return ``self != other``.", + "\n Check equality and either forward a NotImplemented or return the result\n negated.\n ", + } assert SomeClass.__repr__.__doc__ == doc else: diff --git a/tests/test_output/doc-test/test-root/conf.py b/tests/test_output/doc-test/test-root/conf.py index e195e68..34fdd62 100644 --- a/tests/test_output/doc-test/test-root/conf.py +++ b/tests/test_output/doc-test/test-root/conf.py @@ -7,7 +7,3 @@ github_username = "domdfcoding" github_repository = "sphinx-toolbox" source_link_target = "GitHub" - -autodoc_default_options = { - "exclude-members": "__repr__", - } diff --git a/tests/test_output/doc-test/test-root/docstrings.rst b/tests/test_output/doc-test/test-root/docstrings.rst index 5cb4a37..58c7d90 100644 --- a/tests/test_output/doc-test/test-root/docstrings.rst +++ b/tests/test_output/doc-test/test-root/docstrings.rst @@ -6,8 +6,10 @@ The Sphinx output looks like: .. automodule:: attr_utils.annotations :members: AttrsClass + :exclude-members: __init__ :special-members: .. autoattrs:: attr_utils.annotations.AttrsClass :members: + :exclude-members: __init__ :special-members: diff --git a/tests/test_output/test_output/test_html_output_annotations_html_.html b/tests/test_output/test_output/test_html_output_annotations_html_.html index f12b948..0f6e4c2 100644 --- a/tests/test_output/test_output/test_html_output_annotations_html_.html +++ b/tests/test_output/test_output/test_html_output_annotations_html_.html @@ -196,4 +196,4 @@