summaryrefslogtreecommitdiff
path: root/numpy/random/tests/test_random.py
diff options
context:
space:
mode:
authorBharat123Rox <bharatr@symphonyai.com>2019-03-05 10:39:14 +0530
committerBharat123Rox <bharatr@symphonyai.com>2019-03-05 10:39:14 +0530
commit67fb19f25e1114e76bd75219bc592feaae95f6a9 (patch)
tree706ec1c14b9dcbe282fd1ae8c11ae24cd4abd638 /numpy/random/tests/test_random.py
parent15b092f5541e80d7c3d0108957406c6f8686aba0 (diff)
downloadnumpy-67fb19f25e1114e76bd75219bc592feaae95f6a9.tar.gz
Fix #13087 by raising a ValueError and adding a unit test for it
Diffstat (limited to 'numpy/random/tests/test_random.py')
-rw-r--r--numpy/random/tests/test_random.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 656e38dc8..389fd3b7e 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -400,6 +400,7 @@ class TestRandomDist(object):
assert_raises(ValueError, sample, [1, 2], 3, p=[1.1, -0.1])
assert_raises(ValueError, sample, [1, 2], 3, p=[0.4, 0.4])
assert_raises(ValueError, sample, [1, 2, 3], 4, replace=False)
+ assert_raises(ValueError, sample, [1, 2, 3], -2, replace=False)
assert_raises(ValueError, sample, [1, 2, 3], 2,
replace=False, p=[1, 0, 0])