Lines Matching refs:permutations
255 for indices in permutations(range(n), r):
388 self.assertRaises(TypeError, permutations) # too few arguments
389 self.assertRaises(TypeError, permutations, 'abc', 2, 1) # too many arguments
390 self.assertRaises(TypeError, permutations, None) # pool is not iterable
391 self.assertRaises(ValueError, permutations, 'abc', -2) # r is negative
392 self.assertEqual(list(permutations('abc', 32)), []) # r > n
393 self.assertRaises(TypeError, permutations, 'abc', 's') # r is not an int or None
394 self.assertEqual(list(permutations(range(3), 2)),
433 result = list(permutations(values, r))
444 self.assertEqual(result, list(permutations(values, None))) # test r as None
445 self.assertEqual(result, list(permutations(values))) # test default r
448 self.pickletest(proto, permutations(values, r)) # test pickling
453 permutations("A", 2**30)
457 self.assertEqual(len(set(map(id, permutations('abcde', 3)))), 1)
458 self.assertNotEqual(len(set(map(id, list(permutations('abcde', 3))))), 1)
469 perm = list(permutations(s, r))
1603 it = permutations([None, []], 1)
1711 self.assertEqual(list(permutations('ABCD', 2)),
1713 self.assertEqual(list(permutations(range(3))),
1863 self.makecycle(permutations([1,2,a,3], 3), a)
2272 check(permutations('abcd'),
2274 check(permutations('abcd', 3),
2276 check(permutations('abcde', 3),
2278 check(permutations(range(10), 4),