Skip to content

Commit 27ece36

Browse files
committed
tests: use inspect.getdoc() to get around breaking change in Python 3.13
python/cpython#81283 Fixes #99
1 parent 09f9d13 commit 27ece36

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_functional.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import glob
2+
import inspect
23
import os
34
import re
45
import tempfile
@@ -55,7 +56,7 @@ def test():
5556
rst2pdf.__file__
5657
except ImportError:
5758
raise unittest.SkipTest
58-
src = '\n'.join(l[4:] for l in func.__doc__.splitlines()[2:])
59+
src = ''.join(inspect.getdoc(func).splitlines(keepends=True)[2:])
5960
os.mkdir(_outdir)
6061
try:
6162
runsphinx(src, builder, confoverrides)

0 commit comments

Comments
 (0)