It seems reasonable to refactor NpathMetric towards better testability.
The problem is that this class runs mvn process under the hood
and then analyzed the output produced.
Consider the option of splitting the running mvn part
from the actual analysis of the process output.
Then we can test thoroughly the part related to the analysis of the output file,
while the part related to running the process will be a part of a simple imperative shell.
@ivanovmg ideally, we should change the implementation of npath/main.py and remove the dependency on Maven. It should not be difficult to implement it in Python.
Originally posted by @yegor256 in #702
It seems reasonable to refactor
NpathMetrictowards better testability.The problem is that this class runs
mvnprocess under the hoodand then analyzed the output produced.
Consider the option of splitting the running
mvnpartfrom the actual analysis of the process output.
Then we can test thoroughly the part related to the analysis of the output file,
while the part related to running the process will be a part of a simple imperative shell.
Originally posted by @yegor256 in #702