diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-12-14 14:10:22 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-12-14 14:10:22 -0500 |
commit | af4165234cd74880a7f6a114e01dc4d3e5a1d56f (patch) | |
tree | 2799b962a5626445dc98a9a41ce04842a303a477 | |
parent | e420fa178b121cb50c9d5abee45633de831c0524 (diff) | |
download | python-coveragepy-git-af4165234cd74880a7f6a114e01dc4d3e5a1d56f.tar.gz |
Remove unused import
-rw-r--r-- | tests/test_html.py | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tests/test_html.py b/tests/test_html.py index f22fdc21..9c230c01 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests that HTML generation is awesome.""" -import os.path, re, sys +import os.path, re import coverage import coverage.html from coverage.misc import CoverageException, NotPython, NoSource @@ -248,10 +248,7 @@ class HtmlWithUnparsableFilesTest(CoverageTest): # Jinja2 sets __file__ to be a non-Python file, and then execs code. # If that file contains non-Python code, a TokenError shouldn't # have been raised when writing the HTML report. - if sys.version_info < (3, 0): - source = "exec compile('','','exec') in {'__file__': 'liar.html'}" - else: - source = "exec(compile('','','exec'), {'__file__': 'liar.html'})" + source = "exec(compile('','','exec'), {'__file__': 'liar.html'})" self.make_file("liar.py", source) self.make_file("liar.html", "{# Whoops, not python code #}") cov = coverage.coverage() @@ -263,10 +260,7 @@ class HtmlWithUnparsableFilesTest(CoverageTest): # Jinja2 sets __file__ to be a non-Python file, and then execs code. # If that file contains untokenizable code, we shouldn't get an # exception. - if sys.version_info < (3, 0): - source = "exec compile('','','exec') in {'__file__': 'liar.html'}" - else: - source = "exec(compile('','','exec'), {'__file__': 'liar.html'})" + source = "exec(compile('','','exec'), {'__file__': 'liar.html'})" self.make_file("liar.py", source) # Tokenize will raise an IndentationError if it can't dedent. self.make_file("liar.html", "0\n 2\n 1\n") |