Use itertools.tee to simplify chaining of test parts.
PEP8 fix.