Fixing up tests for python metrics calculation.