use ValueError when vector/matrix multiplications sizes are not supported, was using TypeError for mat*vec and ValueError for vec*mat.

This commit is contained in:
Campbell Barton
2012-02-11 14:27:36 +00:00
parent 5e1f6f0174
commit b81bfd86b4
2 changed files with 3 additions and 3 deletions

View File

@@ -111,8 +111,8 @@ class MatrixTesting(unittest.TestCase):
vec = Vector((1, 2))
self.assertRaises(TypeError, mat1.__mul__, vec)
self.assertRaises(ValueError, vec.__mul__, mat1) # Why are these different?!
self.assertRaises(ValueError, mat1.__mul__, vec)
self.assertRaises(ValueError, vec.__mul__, mat1)
mat2 = Matrix(((1, 2),
(-2, 3)))