Exemplo n.º 1
0
 def test_getOnePermutation(self):
     iterable = ["a"]
     results = utils.getPermutations(iterable)
     expected = [('a',)]
     self.assertEqual(results, expected)
Exemplo n.º 2
0
 def test_getThreePermutations(self):
     iterable = ["a", "b", "c"]
     results = utils.getPermutations(iterable)
     expected = [('a',), ('b',), ('c',), ('a', 'b'), ('a', 'c'), ('b', 'c'),
                 ('a', 'b', 'c')]
     self.assertEqual(results, expected)