Steve Piercy
2016-07-04 dc93a53c1ab033d7e4138a5040858f4c7aab90ef
Show testsetup code in rendered docs.

For `testsetup`, Sphinx does not show code in the output: http://www.sphinx-doc.org/en/stable/ext/doctest.html#directive-testsetup This commit fixes that issue, although duplicates code. I'll submit a feature request to https://github.com/sphinx-doc/sphinx/ Fixes #2670
(cherry picked from commit 2612de2)
1 files modified
10 ■■■■■ changed files
pyramid/decorator.py 10 ●●●●● patch | view | raw | blame | history
pyramid/decorator.py
@@ -8,6 +8,16 @@
    replacing the function it decorates with an instance variable.  It is, in
    Python parlance, a non-data descriptor.  An example:
    .. code-block:: python
        from pyramid.decorator import reify
        class Foo(object):
            @reify
            def jammy(self):
                print('jammy called')
                return 1
    .. testsetup::
        from pyramid.decorator import reify