def testTrim(self): t = range(100) random.shuffle(t) trimmed = _03_thinkstats._trim(t, p=0.05) n = len(trimmed) self.assertEquals(n, 90)