summaryrefslogtreecommitdiff
path: root/docs/doctests.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-03-20 23:25:37 -0400
committerChris McDonough <chrism@plope.com>2011-03-20 23:25:37 -0400
commitd8176e7279e19ab3e618056555a05d710bb161d4 (patch)
tree43717841fd1326d22a4aaea2d1a17c1c0ce72fcb /docs/doctests.py
parent1c4912af221e89ecf117154e2708f58984287ad8 (diff)
parentc3f021fbf2fd027b0778ca9dadc79ae7b2a5394b (diff)
downloadwebob-tests.pycon2011.tar.gz
merge from headtests.pycon2011
Diffstat (limited to 'docs/doctests.py')
-rw-r--r--docs/doctests.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/docs/doctests.py b/docs/doctests.py
new file mode 100644
index 0000000..9aecb31
--- /dev/null
+++ b/docs/doctests.py
@@ -0,0 +1,17 @@
+import unittest
+import doctest
+
+def test_suite():
+ flags = doctest.ELLIPSIS|doctest.NORMALIZE_WHITESPACE
+ return unittest.TestSuite((
+ doctest.DocFileSuite('test_request.txt', optionflags=flags),
+ doctest.DocFileSuite('test_response.txt', optionflags=flags),
+ doctest.DocFileSuite('test_dec.txt', optionflags=flags),
+ doctest.DocFileSuite('do-it-yourself.txt', optionflags=flags),
+ doctest.DocFileSuite('file-example.txt', optionflags=flags),
+ doctest.DocFileSuite('index.txt', optionflags=flags),
+ doctest.DocFileSuite('reference.txt', optionflags=flags),
+ ))
+
+if __name__ == '__main__':
+ unittest.main(defaultTest='test_suite')