diff options
Diffstat (limited to 'doc/en/genapi.py')
-rw-r--r-- | doc/en/genapi.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/en/genapi.py b/doc/en/genapi.py index 0ede44fa2..d79c65c25 100644 --- a/doc/en/genapi.py +++ b/doc/en/genapi.py @@ -1,6 +1,8 @@ +from __future__ import print_function import textwrap import inspect + class Writer(object): def __init__(self, clsname): self.clsname = clsname @@ -11,10 +13,10 @@ class Writer(object): def __exit__(self, *args): self.file.close() - print "wrote", self.file.name + print("wrote", self.file.name) def line(self, line): - self.file.write(line+"\n") + self.file.write(line + "\n") def docmethod(self, method): doc = " ".join(method.__doc__.split()) @@ -30,6 +32,7 @@ class Writer(object): self.line(w.fill(doc)) self.line("") + def pytest_funcarg__a(request): with Writer("request") as writer: writer.docmethod(request.getfixturevalue) @@ -37,5 +40,6 @@ def pytest_funcarg__a(request): writer.docmethod(request.addfinalizer) writer.docmethod(request.applymarker) + def test_hello(a): pass |