mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-12 03:34:20 +00:00
fix randomness seed across randomized test
This commit is contained in:
parent
0c401a3e2a
commit
253f927c0a
@ -1,6 +1,6 @@
|
||||
import itertools
|
||||
import warnings
|
||||
from random import Random
|
||||
import random
|
||||
from tests.core.pyspec.eth2spec.test.helpers.constants import PHASE0, ALTAIR
|
||||
from typing import Callable
|
||||
from tests.core.pyspec.eth2spec.test.context import (
|
||||
@ -276,7 +276,7 @@ def _generate_randomized_scenarios():
|
||||
NOTE: the main block driver builds a block for the **next** slot, so
|
||||
the slot transitions are offset by -1 to target certain boundaries.
|
||||
"""
|
||||
rng = Random(1336)
|
||||
rng = random.Random(1336)
|
||||
|
||||
# go forward 0 or 1 epochs
|
||||
epochs_set = (
|
||||
@ -377,6 +377,7 @@ def _iter_temporal(spec, callable_or_int):
|
||||
@single_phase
|
||||
@always_bls
|
||||
def test_harness_for_randomized_blocks(spec, state, test_description):
|
||||
random.seed(1337)
|
||||
for mutation, validation in test_description["setup"]:
|
||||
mutation(spec, state)
|
||||
validation(spec, state)
|
||||
|
Loading…
x
Reference in New Issue
Block a user