def test_three_items(self): items = ['a', 'b', 'c'] self.assertEqual( list(permutations(items)), [ ('a', 'b', 'c'), ('a', 'c', 'b'), ('b', 'a', 'c'), ('b', 'c', 'a'), ('c', 'a', 'b'), ('c', 'b', 'a') ] )
def test_one_item(self): self.assertEqual(list(permutations(['a'])), [('a',)])
def test_zero_items(self): self.assertEqual(list(permutations([])), [])