summaryrefslogtreecommitdiff
path: root/abc.py
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2016-04-24 15:42:34 -0700
committerSteve Piercy <web@stevepiercy.com>2016-04-24 15:42:34 -0700
commitb5fcc452c364284648aae4c0ce061b3bac711cd0 (patch)
tree79207d83a1396f531d7665f4a3615f76d6aca211 /abc.py
parent1a6e20fbc048a03bee8b8be8955788861c4ed9ed (diff)
downloadpyramid-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.py18
1 files changed, 18 insertions, 0 deletions
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()