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 | a345c26c87af29a3a8f90de7f0f94e8394fb4cce (patch) | |
tree | 6ffbde4c811d6c154f6993b766943d126992f4df /test/test_html.py | |
parent | bc25fb0a51e1e3f8e395d5723311a748649ac7da (diff) | |
download | python-coveragepy-git-a345c26c87af29a3a8f90de7f0f94e8394fb4cce.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 2f1dc5d2..2e84620e 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 ) |