def testRandomKnownValue(self):
   gen = lehmer_random.lehmerRandomNumberGenerator()
   for i in range(10000):
     gen.random()
   # Known value.
   self.assertEqual(gen.state, 399268537)
 def testrandomElement(self):
   test_list = [7]
   gen = lehmer_random.lehmerRandomNumberGenerator()
   self.assertEqual(gen.randomElement(test_list), 7)
 def testEquilikelyType(self):
   gen = lehmer_random.lehmerRandomNumberGenerator()
   self.assertEqual(type(gen.equilikely(1, 5)), int)
 def testEquilikelyBounded(self):
   gen = lehmer_random.lehmerRandomNumberGenerator()
   for i in range(100):
     value = gen.equilikely(1, 5)
     self.assertLessEqual(value, 5)
     self.assertGreaterEqual(value, 1)
 def testUniformBounded(self):
   gen = lehmer_random.lehmerRandomNumberGenerator()
   for i in range(100):
     value = gen.uniform(-3, 3)
     self.assertLess(value, 3)
     self.assertGreater(value, -3)