diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-07-31 22:20:06 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-07-31 22:20:06 -0400 |
commit | 1cac130c6c95804657c62c3944fd299a6690e73a (patch) | |
tree | 9974e07fdf4a52523bba420e1f6624776c30252a /test/test_html.py | |
parent | 77a5085b2af747466d06568ad026b6e8495949b3 (diff) | |
download | python-coveragepy-git-1cac130c6c95804657c62c3944fd299a6690e73a.tar.gz |
Make the new test also run in Py3
Diffstat (limited to 'test/test_html.py')
-rw-r--r-- | test/test_html.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_html.py b/test/test_html.py index 3ebdb10b..36275fa0 100644 --- a/test/test_html.py +++ b/test/test_html.py @@ -204,7 +204,10 @@ class HtmlWithUnparsableFilesTest(CoverageTest): have been raised when writing the HTML report. """ - source = "exec compile('', '', 'exec') in {'__file__' : 'liar.html'}" + if sys.version_info < (3, 0): + source = "exec compile('','','exec') in {'__file__': 'liar.html'}" + else: + 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() |