(self, files)
| 24 | self._coverage_file = os.path.join(project_path, "pydev_coverage.py") |
| 25 | |
| 26 | def _do_analyze(self, files): |
| 27 | invalid_files = [] |
| 28 | |
| 29 | p = subprocess.Popen( |
| 30 | [sys.executable, self._coverage_file, "--pydev-analyze"], stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE |
| 31 | ) |
| 32 | __, stderrdata = p.communicate("|".join(files).encode()) |
| 33 | |
| 34 | if stderrdata: |
| 35 | match = re.search("Invalid files not passed to coverage: (.*?)$", stderrdata.decode(), re.M) # @UndefinedVariable |
| 36 | if match: |
| 37 | invalid_files = [f.strip() for f in match.group(1).split(",")] |
| 38 | return invalid_files |
| 39 | |
| 40 | def test_pydev_analyze_ok(self): |
| 41 | ref_valid_files = [__file__, os.path.join(self._resources_path, "_debugger_case18.py")] |
no test coverage detected