summaryrefslogtreecommitdiff
path: root/tests/test_html.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-18 13:25:49 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-18 13:25:49 -0500
commit8d60d392c5d9b00560c4a9418902f12126dae125 (patch)
treec6634c5c0b940a32c1fb0afb36b4a928a91f3304 /tests/test_html.py
parent0d0836309b6354a07fb09cd8d28b309b6c8dba6c (diff)
downloadpython-coveragepy-git-8d60d392c5d9b00560c4a9418902f12126dae125.tar.gz
Collect all the nudgy environment checks into coverage.env
Diffstat (limited to 'tests/test_html.py')
-rw-r--r--tests/test_html.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_html.py b/tests/test_html.py
index b0cb839e..b4189af2 100644
--- a/tests/test_html.py
+++ b/tests/test_html.py
@@ -1,8 +1,11 @@
# -*- coding: utf-8 -*-
"""Tests that HTML generation is awesome."""
-import os.path, re, sys
+import os.path
+import re
+
import coverage
+from coverage import env
import coverage.html
from coverage.misc import CoverageException, NotPython, NoSource
@@ -303,7 +306,7 @@ class HtmlWithUnparsableFilesTest(HtmlTestHelpers, CoverageTest):
cov.html_report()
html_report = self.get_html_report_content("sub/not_ascii.py")
- if sys.version_info < (3, 0):
+ if env.PY2:
expected = "# Isn&#39;t this great?&#65533;!"
else:
expected = "# Isn&#39;t this great?&#203;!"