Lines Matching refs:getrandbits
268 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
271 getbits = self.gen.getrandbits
279 self.assertRaises(TypeError, self.gen.getrandbits)
280 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
281 self.assertRaises(ValueError, self.gen.getrandbits, 0)
282 self.assertRaises(ValueError, self.gen.getrandbits, -1)
283 self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
345 bits100 = self.gen.getrandbits(100)
347 self.assertEqual(self.gen.getrandbits(100), bits100)
446 self.assertEqual(self.gen.getrandbits(100),
450 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
453 getbits = self.gen.getrandbits
461 self.assertRaises(TypeError, self.gen.getrandbits)
462 self.assertRaises(TypeError, self.gen.getrandbits, 'a')
463 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
464 self.assertRaises(ValueError, self.gen.getrandbits, 0)
465 self.assertRaises(ValueError, self.gen.getrandbits, -1)