| 336 | f"but one was with the following message:\n\n{e}") |
| 337 | |
| 338 | def test_in_bounds_fuzz(self): |
| 339 | # Don't use fixed seed |
| 340 | rng = np.random.RandomState() |
| 341 | |
| 342 | for dt in self.itype[1:]: |
| 343 | for ubnd in [4, 8, 16]: |
| 344 | vals = rng.randint(2, ubnd, size=2**16, dtype=dt) |
| 345 | assert_(vals.max() < ubnd) |
| 346 | assert_(vals.min() >= 2) |
| 347 | |
| 348 | vals = rng.randint(0, 2, size=2**16, dtype=np.bool) |
| 349 | |
| 350 | assert_(vals.max() < 2) |
| 351 | assert_(vals.min() >= 0) |
| 352 | |
| 353 | def test_repeatability(self): |
| 354 | # We use a sha256 hash of generated sequences of 1000 samples |