Lines Matching refs:getrandbits
347 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
348 self.assertEqual(self.gen.getrandbits(0), 0)
351 getbits = self.gen.getrandbits
364 self.assertRaises(TypeError, self.gen.getrandbits)
365 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
366 self.assertRaises(ValueError, self.gen.getrandbits, -1)
367 self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
615 bits100 = self.gen.getrandbits(100)
617 self.assertEqual(self.gen.getrandbits(100), bits100)
728 self.assertEqual(self.gen.getrandbits(100),
889 gen2.getrandbits(n * 8).to_bytes(n, 'little'))
1144 def getrandbits(self, n): member in TestRandomSubclassing.test_subclasses_overriding_methods.SubClass1
1146 return random.Random.getrandbits(self, n)
1163 def getrandbits(self, n): member in TestRandomSubclassing.test_subclasses_overriding_methods.SubClass3
1165 return random.Random.getrandbits(self, n)
1187 def getrandbits(self, n): member in TestRandomSubclassing.test_subclasses_overriding_methods.Mixin2
1189 return random.Random.getrandbits(self, n)
1235 val = random.getrandbits(128)
1243 val = random.getrandbits(128)