'Check basic expectations about a batch of samples.'

def _check_results(self, pop, res, replace=True):

    spop = set(pop)
    sres = set(res)
    self.assertLessEqual(sres, spop)
    self.assertNotEqual(sorted(res), list(res))
    if replace:
        self.assertLess(len(sres), len(res), res)
    else:
        self.assertEqual(len(sres), len(res), res)
