summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/tests/test_multiarray.py11
-rw-r--r--numpy/random/tests/test_random.py6
-rw-r--r--numpy/tests/test_warnings.py2
3 files changed, 5 insertions, 14 deletions
diff --git a/numpy/core/tests/test_multiarray.py b/numpy/core/tests/test_multiarray.py
index d22f16099..27ac96703 100644
--- a/numpy/core/tests/test_multiarray.py
+++ b/numpy/core/tests/test_multiarray.py
@@ -3702,17 +3702,6 @@ class TestSubscripting(object):
class TestPickling(object):
- def test_highest_available_pickle_protocol(self):
- try:
- import pickle5
- except ImportError:
- pickle5 = None
-
- if sys.version_info[:2] >= (3, 8) or pickle5 is not None:
- assert pickle.HIGHEST_PROTOCOL >= 5
- else:
- assert pickle.HIGHEST_PROTOCOL < 5
-
@pytest.mark.skipif(pickle.HIGHEST_PROTOCOL >= 5,
reason=('this tests the error messages when trying to'
'protocol 5 although it is not available'))
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 711270072..121c7dd8c 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -515,7 +515,7 @@ class TestRandomDist(object):
def test_binomial(self):
np.random.seed(self.seed)
- actual = np.random.binomial(100.123, .456, size=(3, 2))
+ actual = np.random.binomial(100, .456, size=(3, 2))
desired = np.array([[37, 43],
[42, 48],
[46, 45]])
@@ -612,7 +612,7 @@ class TestRandomDist(object):
def test_hypergeometric(self):
np.random.seed(self.seed)
- actual = np.random.hypergeometric(10.1, 5.5, 14, size=(3, 2))
+ actual = np.random.hypergeometric(10, 5, 14, size=(3, 2))
desired = np.array([[10, 10],
[10, 10],
[9, 9]])
@@ -923,6 +923,8 @@ class TestRandomDist(object):
def __int__(self):
raise TypeError
+ __index__ = __int__
+
throwing_int = np.array(1).view(ThrowingInteger)
assert_raises(TypeError, np.random.hypergeometric, throwing_int, 1, 1)
diff --git a/numpy/tests/test_warnings.py b/numpy/tests/test_warnings.py
index aa6f69f7e..f5560a099 100644
--- a/numpy/tests/test_warnings.py
+++ b/numpy/tests/test_warnings.py
@@ -44,7 +44,7 @@ if sys.version_info >= (3, 4):
if p.ls[-1] == 'warn' and (
len(p.ls) == 1 or p.ls[-2] == 'warnings'):
- if "testing/tests/test_warnings.py" is self.__filename:
+ if "testing/tests/test_warnings.py" == self.__filename:
# This file
return