Skip to content

Commit

Permalink
tests: use inspect.getdoc() to get around breaking change in Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
yuja committed Jan 25, 2025
1 parent 09f9d13 commit 0ae6b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_functional.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import glob
import inspect
import os
import re
import tempfile
Expand Down Expand Up @@ -55,7 +56,7 @@ def test():
rst2pdf.__file__
except ImportError:
raise unittest.SkipTest
src = '\n'.join(l[4:] for l in func.__doc__.splitlines()[2:])
src = ''.join(inspect.getdoc(func).splitlines(keepends=True)[2:])
os.mkdir(_outdir)
try:
runsphinx(src, builder, confoverrides)
Expand Down

0 comments on commit 0ae6b87

Please sign in to comment.