/opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests
NameSizeModeActions
data/-0755rm
__pycache__/-0755rm
test_abc.py20140644editdlrm
test_api.py189060644editdlrm
test_arrayprint.py102150644editdlrm
test_datetime.py925270644editdlrm
test_defchararray.py257640644editdlrm
test_deprecations.py188020644editdlrm
test_dtype.py262020644editdlrm
test_einsum.py395980644editdlrm
test_errstate.py15880644editdlrm
test_extint128.py57740644editdlrm
test_function_base.py114290644editdlrm
test_getlimits.py46130644editdlrm
test_half.py186480644editdlrm
test_indexerrors.py49380644editdlrm
test_indexing.py479660644editdlrm
test_item_selection.py36650644editdlrm
test_longdouble.py59670644editdlrm
test_machar.py10140644editdlrm
test_memmap.py70750644editdlrm
test_mem_overlap.py295640644editdlrm
test_multiarray.py2608050644editdlrm
test_nditer.py1082830644editdlrm
test_numeric.py1008540644editdlrm
test_numerictypes.py146100644editdlrm
test_print.py80890644editdlrm
test_records.py156350644editdlrm
test_regression.py812110644editdlrm
test_scalarinherit.py7710644editdlrm
test_scalarmath.py250330644editdlrm
test_scalarprint.py9170644editdlrm
test_shape_base.py185440644editdlrm
test_ufunc.py549850644editdlrm
test_umath.py987850644editdlrm
test_umath_complex.py198000644editdlrm
test_unicode.py142380644editdlrm
Edit: /opt/alt/python37/lib64/python3.7/site-packages/numpy/core/tests/test_errstate.py (1588B)
from __future__ import division, absolute_import, print_function import platform import numpy as np from numpy.testing import TestCase, assert_, run_module_suite, dec class TestErrstate(TestCase): @dec.skipif(platform.machine() == "armv5tel", "See gh-413.") def test_invalid(self): with np.errstate(all='raise', under='ignore'): a = -np.arange(3) # This should work with np.errstate(invalid='ignore'): np.sqrt(a) # While this should fail! try: np.sqrt(a) except FloatingPointError: pass else: self.fail("Did not raise an invalid error") def test_divide(self): with np.errstate(all='raise', under='ignore'): a = -np.arange(3) # This should work with np.errstate(divide='ignore'): a // 0 # While this should fail! try: a // 0 except FloatingPointError: pass else: self.fail("Did not raise divide by zero error") def test_errcall(self): def foo(*args): print(args) olderrcall = np.geterrcall() with np.errstate(call=foo): assert_(np.geterrcall() is foo, 'call is not foo') with np.errstate(call=None): assert_(np.geterrcall() is None, 'call is not None') assert_(np.geterrcall() is olderrcall, 'call is not olderrcall') if __name__ == "__main__": run_module_suite()