ENH: add testing weighting code.