summaryrefslogtreecommitdiff
path: root/numpy/matrixlib/tests/test_defmatrix.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/matrixlib/tests/test_defmatrix.py')
-rw-r--r--numpy/matrixlib/tests/test_defmatrix.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/matrixlib/tests/test_defmatrix.py b/numpy/matrixlib/tests/test_defmatrix.py
index 6aa24e4ff..fd36d7770 100644
--- a/numpy/matrixlib/tests/test_defmatrix.py
+++ b/numpy/matrixlib/tests/test_defmatrix.py
@@ -35,8 +35,8 @@ class TestCtor(TestCase):
assert_(mvec.shape == (1, 5))
def test_exceptions(self):
- # Check for TypeError when called with invalid string data.
- assert_raises(TypeError, matrix, "invalid")
+ # Check for ValueError when called with invalid string data.
+ assert_raises(ValueError, matrix, "invalid")
def test_bmat_nondefault_str(self):
A = np.array([[1, 2], [3, 4]])
@@ -186,6 +186,11 @@ class TestProperties(TestCase):
A = matrix([[1, 0], [0, 1]])
assert_(repr(A) == "matrix([[1, 0],\n [0, 1]])")
+ def test_make_bool_matrix_from_str(self):
+ A = matrix('True; True; False')
+ B = matrix([[True], [True], [False]])
+ assert_array_equal(A, B)
+
class TestCasting(TestCase):
def test_basic(self):
A = np.arange(100).reshape(10, 10)