From 85945f7b5c901e3e6b2a43683abec3003e658c51 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Thu, 10 Sep 2015 13:44:56 +0200 Subject: Python 3: ignore exception details in doctests Exception details are formatted differently between Python 2 and 3. --- tests/test_doctests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit v1.2.1