add unit/integrted tests for dpc

I strongly suggest returning the average, rather than just the value from fitting y.