megablocks / tests /fixtures /fixtures.py
drbh
Migrated from kernels-community/megablocks
29caf74 unverified
raw
history blame
329 Bytes
# Copyright 2024 Databricks
# SPDX-License-Identifier: Apache-2.0
import pytest
from tests.conftest import _get_option
@pytest.fixture
def rank_zero_seed(pytestconfig: pytest.Config) -> int:
"""Read the rank_zero_seed from the CLI option."""
seed = _get_option(pytestconfig, 'seed', default='0')
return int(seed)