I'm trying to find a python code coverage tool which can measure if subexpressions are covered in a statement:
For instance, I'd like to see if condition1/condition2/condtion3 is covered in following example?
if condition1 or condition2 or condition3: x = true_value
The only reasonable answer to this is: There is no current out-of-the-box implementation.
The closest thing which has branch coverage is Ned Batchelder's coverage.py tool.
NB: Implementing this would not be trivial by any means.
As pointed out by @Ira Baxter it is possible to implement.