def test_random_andnot(self):
        testcount = 100
        rangesize = 100
        
        rng = range(rangesize)
        
        for testnum in xrange(testcount):
            negs = sorted(sample(rng, randint(0, rangesize-1)))
            negset = frozenset(negs)
            matched = [n for n in rng if n not in negset]
            pos = FakeScorer(*rng)
            neg = FakeScorer(*negs)
            ans = AndNotScorer(pos, neg)
            ids = list(ans.all_ids())
            self.assertEqual(ids, matched)
dataset/ETHPy150Open dokipen/whoosh/tests/test_scorers.py/TestScorers.test_random_andnot/original