summaryrefslogtreecommitdiff
path: root/numpy/random/tests/test_direct.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2019-06-26 06:17:59 -0700
committerGitHub <noreply@github.com>2019-06-26 06:17:59 -0700
commit60ede65d0d1ba546eb6da3764b55c061a11a7a80 (patch)
treee401808d0fffe76ee57b866a40a3f28677f8b82d /numpy/random/tests/test_direct.py
parent4668b46310e74b2f3c78eb213b6d796456278942 (diff)
parent42f8ed33dbc8c911a63a73df91e298505019eefc (diff)
downloadnumpy-60ede65d0d1ba546eb6da3764b55c061a11a7a80.tar.gz
Merge pull request #13838 from rkern/sfc64
ENH: SFC64 BitGenerator
Diffstat (limited to 'numpy/random/tests/test_direct.py')
-rw-r--r--numpy/random/tests/test_direct.py17
1 files changed, 16 insertions, 1 deletions
diff --git a/numpy/random/tests/test_direct.py b/numpy/random/tests/test_direct.py
index 38d21062b..1e824fbcc 100644
--- a/numpy/random/tests/test_direct.py
+++ b/numpy/random/tests/test_direct.py
@@ -7,7 +7,7 @@ from numpy.testing import (assert_equal, assert_allclose, assert_array_equal,
import pytest
from numpy.random import (
- Generator, MT19937, PCG64, Philox, RandomState, SeedSequence
+ Generator, MT19937, PCG64, Philox, RandomState, SeedSequence, SFC64
)
from numpy.random.common import interface
@@ -385,3 +385,18 @@ class TestMT19937(Base):
bit_generator.state = tup
actual = rs.integers(2 ** 16)
assert_equal(actual, desired)
+
+
+class TestSFC64(Base):
+ @classmethod
+ def setup_class(cls):
+ cls.bit_generator = SFC64
+ cls.bits = 64
+ cls.dtype = np.uint64
+ cls.data1 = cls._read_csv(
+ join(pwd, './data/sfc64-testset-1.csv'))
+ cls.data2 = cls._read_csv(
+ join(pwd, './data/sfc64-testset-2.csv'))
+ cls.seed_error_type = (ValueError, TypeError)
+ cls.invalid_init_types = [(3.2,), ([None],), (1, None)]
+ cls.invalid_init_values = [(-1,)]