MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _do_analyze

Method _do_analyze

tests_python/test_pydevcoverage.py:26–38  ·  view source on GitHub ↗
(self, files)

Source from the content-addressed store, hash-verified

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")]

Calls 3

searchMethod · 0.80
joinMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected