(self)
| 334 | assert_array_equal(actual, desired) |
| 335 | |
| 336 | def test_random_integers_max_int(self): |
| 337 | # Tests whether random_integers can generate the |
| 338 | # maximum allowed Python int that can be converted |
| 339 | # into a C long. Previous implementations of this |
| 340 | # method have thrown an OverflowError when attempting |
| 341 | # to generate this integer. |
| 342 | with suppress_warnings() as sup: |
| 343 | w = sup.record(DeprecationWarning) |
| 344 | actual = np.random.random_integers(np.iinfo('l').max, |
| 345 | np.iinfo('l').max) |
| 346 | assert_(len(w) == 1) |
| 347 | |
| 348 | desired = np.iinfo('l').max |
| 349 | assert_equal(actual, desired) |
| 350 | |
| 351 | def test_random_integers_deprecated(self): |
| 352 | with warnings.catch_warnings(): |
nothing calls this directly
no test coverage detected