test_round.py 472 B

123456789101112131415161718
  1. from __future__ import division, print_function, absolute_import
  2. import numpy as np
  3. import pytest
  4. from scipy.special import _test_round
  5. @pytest.mark.skipif(not _test_round.have_fenv(), reason="no fenv()")
  6. def test_add_round_up():
  7. np.random.seed(1234)
  8. _test_round.test_add_round(10**5, 'up')
  9. @pytest.mark.skipif(not _test_round.have_fenv(), reason="no fenv()")
  10. def test_add_round_down():
  11. np.random.seed(1234)
  12. _test_round.test_add_round(10**5, 'down')