From b5fcc452c364284648aae4c0ce061b3bac711cd0 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sun, 24 Apr 2016 15:42:34 -0700 Subject: Allow Sphinx doctests to run and pass with `make doctest SPHINXBUILD=$VENV/bin/sphinx-build`. - TODO: two tests in `docs/narr/hooks.rst` --- abc.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 abc.py (limited to 'abc.py') diff --git a/abc.py b/abc.py new file mode 100644 index 000000000..c200d64c5 --- /dev/null +++ b/abc.py @@ -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() -- cgit v1.2.3