Lines Matching refs:getrandbits
370 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
373 getbits = self.gen.getrandbits
381 self.assertRaises(TypeError, self.gen.getrandbits)
382 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
383 self.assertRaises(ValueError, self.gen.getrandbits, 0)
384 self.assertRaises(ValueError, self.gen.getrandbits, -1)
385 self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
498 bits100 = self.gen.getrandbits(100)
500 self.assertEqual(self.gen.getrandbits(100), bits100)
609 self.assertEqual(self.gen.getrandbits(100),
613 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
616 getbits = self.gen.getrandbits
624 self.assertRaises(TypeError, self.gen.getrandbits)
625 self.assertRaises(TypeError, self.gen.getrandbits, 'a')
626 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
627 self.assertRaises(ValueError, self.gen.getrandbits, 0)
628 self.assertRaises(ValueError, self.gen.getrandbits, -1)
963 val = random.getrandbits(128)
971 val = random.getrandbits(128)