summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Philippsen <nils@redhat.com>2015-09-10 13:44:56 +0200
committerNils Philippsen <nils@redhat.com>2015-09-10 13:44:56 +0200
commit2ffc9c023fe2dc8ea4f29941dd4a0d9c62aead7b (patch)
treeb1c039264114105065ca2e55246d3d8f4165bb53
parent6f5a6d709d49901fcadfbe4319c3f5204a09ae2c (diff)
downloadpaste-git-2ffc9c023fe2dc8ea4f29941dd4a0d9c62aead7b.tar.gz
Python 3: ignore exception details in doctests
Exception details are formatted differently between Python 2 and 3.
-rw-r--r--tests/test_doctests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_doctests.py b/tests/test_doctests.py
index 875fbc2..d59d666 100644
--- a/tests/test_doctests.py
+++ b/tests/test_doctests.py
@@ -1,3 +1,4 @@
+import six
import doctest
from paste.util.import_string import simple_import
import os
@@ -25,7 +26,9 @@ modules = [
'paste.request',
]
-options = doctest.ELLIPSIS|doctest.REPORT_ONLY_FIRST_FAILURE
+options = doctest.ELLIPSIS | doctest.REPORT_ONLY_FIRST_FAILURE
+if six.PY3:
+ options |= doctest.IGNORE_EXCEPTION_DETAIL
def test_doctests():
for filename in filenames: