(self)
| 9 | |
| 10 | class EntropyTestCase(unittest.TestCase): |
| 11 | def test_pool(self): |
| 12 | pool = dns.entropy.EntropyPool(b"seed-value") |
| 13 | self.assertEqual(pool.random_8(), 94) |
| 14 | self.assertEqual(pool.random_16(), 61532) |
| 15 | self.assertEqual(pool.random_32(), 4226376065) |
| 16 | self.assertEqual(pool.random_between(10, 50), 29) |
| 17 | # stir in some not-really-entropy to exercise the stir API |
| 18 | pool.stir(b"not-really-entropy") |
| 19 | |
| 20 | def test_pool_random(self): |
| 21 | pool = dns.entropy.EntropyPool() |
nothing calls this directly
no test coverage detected