Lines Matching refs:permutations
246 for indices in permutations(range(n), r):
379 self.assertRaises(TypeError, permutations) # too few arguments
380 self.assertRaises(TypeError, permutations, 'abc', 2, 1) # too many arguments
381 self.assertRaises(TypeError, permutations, None) # pool is not iterable
382 self.assertRaises(ValueError, permutations, 'abc', -2) # r is negative
383 self.assertEqual(list(permutations('abc', 32)), []) # r > n
384 self.assertRaises(TypeError, permutations, 'abc', 's') # r is not an int or None
385 self.assertEqual(list(permutations(range(3), 2)),
424 result = list(permutations(values, r))
435 self.assertEqual(result, list(permutations(values, None))) # test r as None
436 self.assertEqual(result, list(permutations(values))) # test default r
439 self.pickletest(proto, permutations(values, r)) # test pickling
444 permutations("A", 2**30)
448 self.assertEqual(len(set(map(id, permutations('abcde', 3)))), 1)
449 self.assertNotEqual(len(set(map(id, list(permutations('abcde', 3))))), 1)
460 perm = list(permutations(s, r))
1589 self.assertEqual(list(permutations('ABCD', 2)),
1591 self.assertEqual(list(permutations(range(3))),
1737 self.makecycle(permutations([1,2,a,3], 3), a)
2134 check(permutations('abcd'),
2136 check(permutations('abcd', 3),
2138 check(permutations('abcde', 3),
2140 check(permutations(range(10), 4),