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 | 61012481a34bbda55bd0072ee7f6d831db52c8b5 (patch) | |
tree | e29749aaeb93c6950da22904c7ff49a5fff8652c /test/test_html.py | |
parent | ece33ca68a98a516e61a141fd8150385395abb66 (diff) | |
download | python-coveragepy-61012481a34bbda55bd0072ee7f6d831db52c8b5.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 3ebdb10..36275fa 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() |