These tests are overly convoluted. Just use `assert s.series() in [piecewise1, piecewise2]`.