regen manifest, improve docs generation
--HG-- branch : 1.0.x
This commit is contained in:
parent
a7382df5e9
commit
5156216871
3
MANIFEST
3
MANIFEST
|
@ -30,11 +30,14 @@ doc/test/features.txt
|
|||
doc/test/funcargs.txt
|
||||
doc/test/plugin/doctest.txt
|
||||
doc/test/plugin/figleaf.txt
|
||||
doc/test/plugin/hooklog.txt
|
||||
doc/test/plugin/hookspec.txt
|
||||
doc/test/plugin/index.txt
|
||||
doc/test/plugin/iocapture.txt
|
||||
doc/test/plugin/keyword.txt
|
||||
doc/test/plugin/monkeypatch.txt
|
||||
doc/test/plugin/oejskit.txt
|
||||
doc/test/plugin/pdb.txt
|
||||
doc/test/plugin/pocoo.txt
|
||||
doc/test/plugin/recwarn.txt
|
||||
doc/test/plugin/restdoc.txt
|
||||
|
|
|
@ -37,8 +37,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_doctest.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_doctest.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -32,8 +32,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_figleaf.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -28,8 +28,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_hooklog.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -92,6 +92,14 @@ hook specification sourcecode
|
|||
def pytest_runtest_logreport(rep):
|
||||
""" process item test report. """
|
||||
|
||||
# special handling for final teardown - somewhat internal for now
|
||||
def pytest__teardown_final(session):
|
||||
""" called before test session finishes. """
|
||||
pytest__teardown_final.firstresult = True
|
||||
|
||||
def pytest__teardown_final_logerror(rep):
|
||||
""" called if runtest_teardown_final failed. """
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# test session related hooks
|
||||
# -------------------------------------------------------------------------
|
||||
|
@ -163,3 +171,4 @@ hook specification sourcecode
|
|||
def pytest_trace(category, msg):
|
||||
""" called for debug info. """
|
||||
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -45,18 +45,4 @@ keyword_ mark test functions with keywords that may hold values.
|
|||
hooklog_ log invocations of extension hooks to a file.
|
||||
|
||||
|
||||
.. _`xfail`: xfail.html
|
||||
.. _`figleaf`: figleaf.html
|
||||
.. _`monkeypatch`: monkeypatch.html
|
||||
.. _`iocapture`: iocapture.html
|
||||
.. _`recwarn`: recwarn.html
|
||||
.. _`unittest`: unittest.html
|
||||
.. _`doctest`: doctest.html
|
||||
.. _`oejskit`: oejskit.html
|
||||
.. _`restdoc`: restdoc.html
|
||||
.. _`pocoo`: pocoo.html
|
||||
.. _`resultlog`: resultlog.html
|
||||
.. _`terminal`: terminal.html
|
||||
.. _`pdb`: pdb.html
|
||||
.. _`keyword`: keyword.html
|
||||
.. _`hooklog`: hooklog.html
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -128,8 +128,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_iocapture.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_iocapture.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -43,8 +43,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_keyword.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_keyword.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
.. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_recwarn.py
|
||||
.. _`pytest_iocapture.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_iocapture.py
|
||||
.. _`pytest_monkeypatch.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_monkeypatch.py
|
||||
.. _`plugins`: index.html
|
||||
.. _`pytest_doctest.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_doctest.py
|
||||
.. _`terminal`: terminal.html
|
||||
.. _`hooklog`: hooklog.html
|
||||
.. _`pytest_restdoc.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_restdoc.py
|
||||
.. _`xfail`: xfail.html
|
||||
.. _`pytest_pocoo.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_pocoo.py
|
||||
.. _`pytest_keyword.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_keyword.py
|
||||
.. _`pytest_figleaf.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_figleaf.py
|
||||
.. _`pytest_hooklog.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_hooklog.py
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`pocoo`: pocoo.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. _`oejskit`: oejskit.html
|
||||
.. _`unittest`: unittest.html
|
||||
.. _`iocapture`: iocapture.html
|
||||
.. _`pytest_xfail.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_xfail.py
|
||||
.. _`figleaf`: figleaf.html
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`pytest_terminal.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_terminal.py
|
||||
.. _`recwarn`: recwarn.html
|
||||
.. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_pdb.py
|
||||
.. _`monkeypatch`: monkeypatch.html
|
||||
.. _`resultlog`: resultlog.html
|
||||
.. _`keyword`: keyword.html
|
||||
.. _`restdoc`: restdoc.html
|
||||
.. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_unittest.py
|
||||
.. _`doctest`: doctest.html
|
||||
.. _`pytest_resultlog.py`: http://bitbucket.org/hpk42/py-trunk/raw/70c2666f98bce5a86a5554c601c9c1e77dd1d63d/py/test/plugin/pytest_resultlog.py
|
||||
.. _`pdb`: pdb.html
|
|
@ -58,8 +58,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_monkeypatch.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_monkeypatch.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -28,8 +28,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_pdb.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_pdb.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -28,8 +28,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_pocoo.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_pocoo.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -58,8 +58,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_recwarn.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_recwarn.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -32,8 +32,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_restdoc.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_restdoc.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -28,8 +28,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_resultlog.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_resultlog.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -21,8 +21,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_terminal.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_terminal.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -31,8 +31,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_unittest.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_unittest.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -33,8 +33,4 @@ Do you find the above documentation or the plugin itself lacking?
|
|||
|
||||
Further information: extend_ documentation, other plugins_ or contact_.
|
||||
|
||||
.. _`pytest_xfail.py`: http://bitbucket.org/hpk42/py-trunk/raw/6e9879aca934933c6065776820f22095634a7edf/py/test/plugin/pytest_xfail.py
|
||||
.. _`extend`: ../extend.html
|
||||
.. _`plugins`: index.html
|
||||
.. _`contact`: ../../contact.html
|
||||
.. _`checkout the py.test development version`: ../../download.html#checkout
|
||||
.. include:: links.txt
|
||||
|
|
|
@ -28,6 +28,8 @@ def warn(*args):
|
|||
print >>sys.stderr, "WARN:", msg
|
||||
|
||||
class RestWriter:
|
||||
_all_links = {}
|
||||
|
||||
def __init__(self, target):
|
||||
self.target = py.path.local(target)
|
||||
self.links = []
|
||||
|
@ -92,9 +94,23 @@ class RestWriter:
|
|||
|
||||
def write_links(self):
|
||||
self.Print()
|
||||
self.Print(".. include:: links.txt")
|
||||
for link in self.links:
|
||||
#warn(repr(self.link))
|
||||
self.Print(".. _`%s`: %s" % (link[0], link[1]))
|
||||
key = link[0]
|
||||
if key in self._all_links:
|
||||
assert self._all_links[key] == link[1], (key, link[1])
|
||||
else:
|
||||
self._all_links[key] = link[1]
|
||||
|
||||
def write_all_links(cls, linkpath):
|
||||
p = linkpath.new(basename="links.txt")
|
||||
p_writer = RestWriter(p)
|
||||
p_writer.out = p_writer.target.open("w")
|
||||
for name, value in cls._all_links.items():
|
||||
p_writer.Print(".. _`%s`: %s" % (name, value))
|
||||
p_writer.out.close()
|
||||
del p_writer.out
|
||||
write_all_links = classmethod(write_all_links)
|
||||
|
||||
def make(self, **kwargs):
|
||||
self.out = self.target.open("w")
|
||||
|
@ -266,3 +282,5 @@ if __name__ == "__main__":
|
|||
ov = HookSpec(testdir.join("plugin", "hookspec.txt"))
|
||||
ov.make(config=_config)
|
||||
|
||||
RestWriter.write_all_links(testdir.join("plugin", "links.txt"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue