1# Test docstring extraction 2from gettext import gettext as _ 3 4 5# Empty docstring 6def test(x): 7 """""" 8 9 10# Leading empty line 11def test2(x): 12 13 """docstring""" # XXX This should be extracted but isn't. 14 15 16# XXX Multiline docstrings should be cleaned with `inspect.cleandoc`. 17def test3(x): 18 """multiline 19 docstring 20 """ 21 22 23# Multiple docstrings - only the first should be extracted 24def test4(x): 25 """docstring1""" 26 """docstring2""" 27 28 29def test5(x): 30 """Hello, {}!""".format("world!") # XXX This should not be extracted. 31 32 33# Nested docstrings 34def test6(x): 35 def inner(y): 36 """nested docstring""" # XXX This should be extracted but isn't. 37 38 39class Outer: 40 class Inner: 41 "nested class docstring" # XXX This should be extracted but isn't. 42