diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-23 22:19:30 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-23 22:19:30 -0500 |
commit | 7684a24fc898c776511e87bfbc26b8058af5abfa (patch) | |
tree | 8c61bee89acaadbd0faa2663ec2669ab3a4f57a2 /test/test_html.py | |
parent | 548a3f8bfbcf9176930392c024073bf5661df508 (diff) | |
download | python-coveragepy-7684a24fc898c776511e87bfbc26b8058af5abfa.tar.gz |
Messages with filenames are not good as %r, because it doubles the backslashes...
Diffstat (limited to 'test/test_html.py')
-rw-r--r-- | test/test_html.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_html.py b/test/test_html.py index 2f1dc5d..2e84620 100644 --- a/test/test_html.py +++ b/test/test_html.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Tests that HTML generation is awesome.""" -import os.path, sys +import os.path, re, sys import coverage from coverage.misc import NotPython, NoSource @@ -302,9 +302,9 @@ class HtmlTest(CoverageTest): self.import_local_file('thefile') cov.stop() os.remove("sub/another.py") - + missing_file = os.path.join(self.temp_dir, "sub", "another.py") self.assertRaisesRegexp(NoSource, - "No source for code: '%s'" % missing_file, + "(?i)No source for code: '%s'" % re.escape(missing_file), cov.html_report ) |