add unit/integrted tests for dpc

They almost have the same efficiency. np.sum(().real) might be slightly faster.