Skip to content

Commit

Permalink
Inline last remaining version-specific branch, getting to 100% covera…
Browse files Browse the repository at this point in the history
…ge in a single process (though not true 100% branch coverage).
  • Loading branch information
jamadden committed Jul 21, 2017
1 parent 112fc6e commit f4b29a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/zope/error/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
##############################################################################
"""Error Reporting Utility Tests
"""
import io
import sys
import unittest
import logging
Expand All @@ -23,10 +24,9 @@
from zope.error.error import ErrorReportingUtility, getFormattedException
from zope.error._compat import _u_type, _basestring

if str is bytes:
from io import BytesIO as StringIO
else:
from io import StringIO

class StringIO(io.BytesIO if str is bytes else io.StringIO):
pass


class Error(Exception):
Expand Down Expand Up @@ -321,7 +321,7 @@ def test_getFormattedException(self):
raise Exception('<boom>')
except:
self.assertIn("Exception: &lt;boom&gt;",
getFormattedException(sys.exc_info()))
getFormattedException(sys.exc_info()))
else: # pragma: no cover
self.fail("Exception was not raised (should never happen)")

Expand Down

0 comments on commit f4b29a0

Please sign in to comment.