From f605172d2b595fc42cf55a5f7d4819abb0396fd2 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 20 Jun 2014 01:50:49 +0300 Subject: tests/float/: Skip tests if "math" module is not available. --- tests/float/math-fun-bool.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/float/math-fun-bool.py') diff --git a/tests/float/math-fun-bool.py b/tests/float/math-fun-bool.py index cf718d4b8..57232857a 100644 --- a/tests/float/math-fun-bool.py +++ b/tests/float/math-fun-bool.py @@ -1,6 +1,11 @@ # Test the bool functions from math -from math import isfinite, isnan, isinf +try: + from math import isfinite, isnan, isinf +except ImportError: + print("SKIP") + import sys + sys.exit() test_values = [1, 0, -1, 1.0, 0.0, -1.0, float('NaN'), float('Inf'), -float('NaN'), -float('Inf')] -- cgit v1.2.3