def cases_fn() -> Iterable[gen_typing.TestCase]: for (case_name, case_fn) in shuffling_test_cases(): yield gen_typing.TestCase(fork_name=PHASE0, runner_name='shuffling', handler_name='core', suite_name='shuffle', case_name=case_name, case_fn=case_fn)
def cases_fn() -> Iterable[gen_typing.TestCase]: for (case_name, case_fn) in case_maker(): yield gen_typing.TestCase(fork_name=PHASE0, runner_name='ssz_generic', handler_name=handler_name, suite_name=suite_name, case_name=case_name, case_fn=case_fn)
def cases_fn() -> Iterable[gen_typing.TestCase]: for data in test_case_fn(): print(data) (case_name, case_content) = data yield gen_typing.TestCase( fork_name=PHASE0, runner_name='bls', handler_name=handler_name, suite_name='small', case_name=case_name, case_fn=lambda: [('data', 'data', case_content)])
def cases_fn() -> Iterable[gen_typing.TestCase]: if preset_name == MAINNET: spec = spec_mainnet elif preset_name == MINIMAL: spec = spec_minimal else: raise Exception(f"unrecognized preset: {preset_name}") for (case_name, case_fn) in shuffling_test_cases(spec): yield gen_typing.TestCase(fork_name=PHASE0, preset_name=preset_name, runner_name='shuffling', handler_name='core', suite_name='shuffle', case_name=case_name, case_fn=case_fn)
def ssz_static_cases(fork_name: str, seed: int, name, ssz_type, mode: random_value.RandomizationMode, chaos: bool, count: int): random_mode_name = mode.to_name() # Reproducible RNG rng = Random(seed) for i in range(count): yield gen_typing.TestCase( fork_name=fork_name, runner_name='ssz_static', handler_name=name, suite_name=f"ssz_{random_mode_name}{'_chaos' if chaos else ''}", case_name=f"case_{i}", case_fn=lambda: create_test_case(rng, ssz_type, mode, chaos))