DebugClients/Python/coverage/report.py

branch
maintenance
changeset 6273
0daf79d65080
parent 6219
d6c795b5ce33
diff -r 0a74c1efab70 -r 0daf79d65080 DebugClients/Python/coverage/report.py
--- a/DebugClients/Python/coverage/report.py	Mon Apr 02 12:04:56 2018 +0200
+++ b/DebugClients/Python/coverage/report.py	Tue May 01 12:03:52 2018 +0200
@@ -54,12 +54,12 @@
         """
         reporters = self.coverage._get_file_reporters(morfs)
 
-        if self.config.include:
-            matcher = FnmatchMatcher(prep_patterns(self.config.include))
+        if self.config.report_include:
+            matcher = FnmatchMatcher(prep_patterns(self.config.report_include))
             reporters = [fr for fr in reporters if matcher.match(fr.filename)]
 
-        if self.config.omit:
-            matcher = FnmatchMatcher(prep_patterns(self.config.omit))
+        if self.config.report_omit:
+            matcher = FnmatchMatcher(prep_patterns(self.config.report_omit))
             reporters = [fr for fr in reporters if not matcher.match(fr.filename)]
 
         self._file_reporters = sorted(reporters)
@@ -97,5 +97,8 @@
                 # explicitly suppress those errors.
                 # NotPython is only raised by PythonFileReporter, which has a
                 # should_be_python() method.
-                if fr.should_be_python() and not self.config.ignore_errors:
-                    raise
+                if fr.should_be_python():
+                    if self.config.ignore_errors:
+                        self.coverage._warn("Could not parse Python file {0}".format(fr.filename))
+                    else:
+                        raise

eric ide

mercurial