E.g. if you had
and made your edits
and eventually wanted to merge into history from elsewhere
then you *might* want to rerun tests on all of X', Y, and Z' -- not just on the final Z'.
Because while X' *should* be similar to X, except with D and E's changes, hopefully non conflicting - sometimes there will be conflicts that are not detected by the merge, only by running tests. Interferences.
I.e. sometimes X' will break tests, although X dos not, and although Z' does not either.
Of course, this only matters if your project takes the "All checkins should pass all tests" approach. The approach that simplistic bisect uses.
It doesn't matter so much if you go back and retroactively label versions according to what tests have passed, etc. (Which, of course, Mercurial cannot do worth a darn.)