summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2020-08-09 13:08:41 -0600
committerGitHub <noreply@github.com>2020-08-09 13:08:41 -0600
commit961b56fb58ee6482cffdce6f61cb679eba654daf (patch)
treefd359a0f248ba8e705edc08e08d5997084a7154d
parentdbf37449935bced333a3999afa860aaf304ab1a1 (diff)
parentcbd0897a89064f78fb142d4c6c44d75e761133ab (diff)
downloadnumpy-961b56fb58ee6482cffdce6f61cb679eba654daf.tar.gz
Merge pull request #17033 from mattip/random-pool_size
BUG: fix a compile and a test warning
-rw-r--r--numpy/conftest.py4
-rw-r--r--numpy/random/bit_generator.pxd2
-rw-r--r--pytest.ini2
3 files changed, 5 insertions, 3 deletions
diff --git a/numpy/conftest.py b/numpy/conftest.py
index 078b09566..b73da8bda 100644
--- a/numpy/conftest.py
+++ b/numpy/conftest.py
@@ -105,3 +105,7 @@ def check_fpu_mode(request):
@pytest.fixture(autouse=True)
def add_np(doctest_namespace):
doctest_namespace['np'] = numpy
+
+@pytest.fixture(autouse=True)
+def env_setup(monkeypatch):
+ monkeypatch.setenv('PYTHONHASHSEED', '0')
diff --git a/numpy/random/bit_generator.pxd b/numpy/random/bit_generator.pxd
index bd5e47a20..dfa7d0a71 100644
--- a/numpy/random/bit_generator.pxd
+++ b/numpy/random/bit_generator.pxd
@@ -23,7 +23,7 @@ cdef class BitGenerator():
cdef class SeedSequence():
cdef readonly object entropy
cdef readonly tuple spawn_key
- cdef readonly uint32_t pool_size
+ cdef readonly Py_ssize_t pool_size
cdef readonly object pool
cdef readonly uint32_t n_children_spawned
diff --git a/pytest.ini b/pytest.ini
index 0db7f80dd..149af04b8 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -15,5 +15,3 @@ filterwarnings =
ignore:the matrix subclass is not
ignore:Importing from numpy.matlib is
-env =
- PYTHONHASHSEED=0