Segment tests only when necessary
Merge pull request #29 from staabm/patch-4

Segment tests only when necessary