Source

python-clinic / test2.py

Full commit
import clinic


def test(input):
    c = clinic.Clinic(clinic.CLanguage())
    c.converters['int'] = clinic.int_converter
    output = c.parse(input)
    print("-" * 75)
    print(output)



test("""
verbatim text
yeah yeah yeah
/*[clinic]
[clinic]*/
""")

test("""
lorem ipsum
etcetera
/*[clinic]
module test
test.add

    a: int
        The first integer to add.
    b: int
        The second integer to add.

Adds two integers.
The first one is added to the second one.
  This is indented text in the docstring.
    This is indented further.
  This is outdented.
Back at left margin again.
  Whee, more indented text.
[clinic]*/
trailing text
uninteresting reading
""")