summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/tests/test_longdouble.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_longdouble.py b/numpy/core/tests/test_longdouble.py
index 9e90e8bd1..ed205a6ff 100644
--- a/numpy/core/tests/test_longdouble.py
+++ b/numpy/core/tests/test_longdouble.py
@@ -19,6 +19,7 @@ _o = 1 + np.finfo(np.longdouble).eps
string_to_longdouble_inaccurate = (_o != np.longdouble(repr(_o)))
del _o
+
def test_scalar_extraction():
"""Confirm that extracting a value doesn't convert to python float"""
o = 1 + np.finfo(np.longdouble).eps
@@ -80,6 +81,11 @@ def test_fromstring():
err_msg="reading '%s'" % s)
+@in_foreign_locale
+def test_fromstring_best_effort():
+ assert_equal(np.fromstring("1,234", dtype=float, sep=" "),
+ np.array([1.]))
+
def test_fromstring_bogus():
assert_equal(np.fromstring("1. 2. 3. flop 4.", dtype=float, sep=" "),
np.array([1., 2., 3.]))