Skip to content

Commit 084c6e6

Browse files
committed
fix docstring test
The logic for finding the docstring line number seems to no longer work.
1 parent cf56a4f commit 084c6e6

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

tests/test_builder.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -359,18 +359,7 @@ def public_function(arg_name):
359359
"contents",
360360
)
361361

362-
# Sphinx 5.1.0 and later reports line numbers for docstring
363-
# content.
364-
line_num = "None:"
365-
if sphinx.version_info[:3] >= (5, 1, 0):
366-
line_num = "1:"
367-
368-
# Expected string is too long for one line
369-
expected = (
370-
("the_source.py:" "docstring of the_source.public_function:")
371-
+ line_num
372-
+ (" (vaule)")
373-
)
362+
expected = "src/contents.rst:3: (vaule) Pass a vaule\n"
374363
assert expected in output_text
375364

376365

0 commit comments

Comments
 (0)