diff --git a/tools/coveragerc b/tools/coveragerc index 6fd73a2089..4d272b0dba 100644 --- a/tools/coveragerc +++ b/tools/coveragerc @@ -7,6 +7,9 @@ exclude_lines = if False: # Don't require coverage for base class NotImplementedErrors raise NotImplementedError() + # Don't require coverage for Python 2/3 variations; it's impossible to cover on both + if six.PY3: + if six.PY2: [run] omit = diff --git a/zerver/lib/bugdown/__init__.py b/zerver/lib/bugdown/__init__.py index 277cb74e5c..e553a1ec28 100644 --- a/zerver/lib/bugdown/__init__.py +++ b/zerver/lib/bugdown/__init__.py @@ -67,7 +67,7 @@ def unescape(s): # type: (Text) -> (Text) if six.PY2: return html_parser.HTMLParser().unescape(s) - else: + elif six.PY3: return html.unescape(s) def list_of_tlds():