diff options
| author | Steve Piercy <web@stevepiercy.com> | 2016-04-24 15:42:34 -0700 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2016-04-24 15:42:34 -0700 |
| commit | b5fcc452c364284648aae4c0ce061b3bac711cd0 (patch) | |
| tree | 79207d83a1396f531d7665f4a3615f76d6aca211 /abc.py | |
| parent | 1a6e20fbc048a03bee8b8be8955788861c4ed9ed (diff) | |
| download | pyramid-b5fcc452c364284648aae4c0ce061b3bac711cd0.tar.gz pyramid-b5fcc452c364284648aae4c0ce061b3bac711cd0.tar.bz2 pyramid-b5fcc452c364284648aae4c0ce061b3bac711cd0.zip | |
Allow Sphinx doctests to run and pass with `make doctest SPHINXBUILD=$VENV/bin/sphinx-build`.
- TODO: two tests in `docs/narr/hooks.rst`
Diffstat (limited to 'abc.py')
| -rw-r--r-- | abc.py | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +from pyramid import testing +from pyramid.config import Configurator + + +def total(request, *args): + return sum(args) + + +def prop(request): + print("getting the property") + return "the property" + + +config = Configurator() +config.add_request_method(total) +config.add_request_method(prop, reify=True) + +request = testing.DummyRequest() |
