Skip to content

Commit

Permalink
minor compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Apr 19, 2022
1 parent d49fd8f commit 93a7473
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions tests/test_autodocsumm.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,7 @@ def test_class(self, app):
if sphinx_version[:2] > [3, 1]:
assert in_autosummary("instance_attribute", html)
elif sphinx_version[:2] < [3, 1]:
assert (
'<span class="pre">dummy.TestClass.instance_attribute</span>'
in html
)
assert in_autosummary("TestClass.instance_attribute", html)

assert in_autosummary("test_method", html)
assert in_autosummary("test_attr", html)
Expand Down Expand Up @@ -267,10 +264,7 @@ def test_class_order(self, app):
if sphinx_version[:2] > [3, 1]:
assert in_autosummary("instance_attribute", html)
elif sphinx_version[:2] < [3, 1]:
assert (
'<span class="pre">dummy.TestClass.instance_attribute</span>'
in html
)
assert in_autosummary("TestClass.instance_attribute", html)

assert in_autosummary("test_attr", html)
assert in_autosummary("large_data", html)
Expand All @@ -287,10 +281,7 @@ def test_class_summary_only(self, app):
if sphinx_version[:2] > [3, 1]:
assert in_autosummary("instance_attribute", html)
elif sphinx_version[:2] < [3, 1]:
assert (
'<span class="pre">dummy.TestClass.instance_attribute</span>'
in html
)
assert in_autosummary("TestClass.instance_attribute", html)

assert in_autosummary("test_method", html)
assert in_autosummary("test_attr", html)
Expand All @@ -314,10 +305,7 @@ def test_class_nosignatures(self, app):
if sphinx_version[:2] > [3, 1]:
assert in_autosummary("instance_attribute", html)
elif sphinx_version[:2] < [3, 1]:
assert (
'<span class="pre">dummy.TestClass.instance_attribute</span>'
in html
)
assert in_autosummary("TestClass.instance_attribute", html)

assert in_autosummary("test_method", html)
assert in_autosummary("test_attr", html)
Expand Down

0 comments on commit 93a7473

Please sign in to comment.