From ae3dd61e2f0829d08d35b419b38381b71fe5de6d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 28 Dec 2014 15:40:13 -0500 Subject: Don't use %r for filenames, on windows, the backslashes go nuts. --- coverage/execfile.py | 2 +- coverage/files.py | 2 +- coverage/plugin.py | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'coverage') diff --git a/coverage/execfile.py b/coverage/execfile.py index beaf1913..654d2808 100644 --- a/coverage/execfile.py +++ b/coverage/execfile.py @@ -180,7 +180,7 @@ def make_code_from_py(filename): try: source = get_python_source(filename) except (IOError, NoSource): - raise NoSource("No file to run: %r" % filename) + raise NoSource("No file to run: '%s'" % filename) code = compile(source, filename, "exec") return code diff --git a/coverage/files.py b/coverage/files.py index 8fa8067f..9f0827fa 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -95,7 +95,7 @@ def get_python_source(filename): break else: # Couldn't find source. - raise NoSource("No source for code: %r." % filename) + raise NoSource("No source for code: '%s'." % filename) # Python code should always end with a line with a newline. if source and source[-1] != '\n': diff --git a/coverage/plugin.py b/coverage/plugin.py index 6c7de669..7d67762a 100644 --- a/coverage/plugin.py +++ b/coverage/plugin.py @@ -68,10 +68,10 @@ class FileTracer(object): def has_dynamic_source_filename(self): """Does this FileTracer have dynamic source filenames? - FileTracers can provide dynamically determined filenames by implementing - dynamic_source_filename. Invoking that function is expensive. To - determine whether it should invoke it, coverage.py uses the result of - this function to know if it needs to bother invoking + FileTracers can provide dynamically determined filenames by + implementing dynamic_source_filename. Invoking that function is + expensive. To determine whether it should invoke it, coverage.py uses + the result of this function to know if it needs to bother invoking dynamic_source_filename. Returns: -- cgit v1.2.1