1# Test the bool functions from math 2 3try: 4 from math import isfinite, isnan, isinf 5except ImportError: 6 print("SKIP") 7 raise SystemExit 8 9test_values = [1, 0, -1, 1.0, 0.0, -1.0, float("NaN"), float("Inf"), -float("NaN"), -float("Inf")] 10 11functions = [isfinite, isnan, isinf] 12 13for val in test_values: 14 for f in functions: 15 print(f(val)) 16