summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests/test_classes.py')
-rw-r--r--numpy/polynomial/tests/test_classes.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/numpy/polynomial/tests/test_classes.py b/numpy/polynomial/tests/test_classes.py
index a7cf7209c..46d721df4 100644
--- a/numpy/polynomial/tests/test_classes.py
+++ b/numpy/polynomial/tests/test_classes.py
@@ -53,6 +53,7 @@ def test_class_methods():
yield check_cutdeg, Poly
yield check_truncate, Poly
yield check_trim, Poly
+ yield check_ufunc_override, Poly
#
@@ -575,5 +576,12 @@ def check_mapparms(Poly):
assert_almost_equal([1, 2], p.mapparms())
+def check_ufunc_override(Poly):
+ p = Poly([1, 2, 3])
+ x = np.ones(3)
+ assert_raises(TypeError, np.add, p, x)
+ assert_raises(TypeError, np.add, x, p)
+
+
if __name__ == "__main__":
run_module_suite()