def test_shuffled_set_equivalence(self):
   self.assertEqual(set(random.random_shuffle(list("abcd"))), set("abcd"))
 def test_shuffled(self):
   # The possibility of a collision is smaller as the size of the list
   # increases.
   self.assertNotEqual(random.random_shuffle(list(random.ALPHANUMERIC)),
                       list(random.ALPHANUMERIC))
   self.assertEqual(random.random_shuffle(["a"]), ["a"])
 def test_shuffled_length(self):
   self.assertEqual(len(random.random_shuffle(list("abcd"))), 4)