mirror of
https://github.com/NVIDIA-NeMo/DataDesigner
synced 2026-05-24 09:48:29 +00:00
* update script * update headers * refactor a bit and add test script * update headers * update for edge case * update headers * add step to get file creation date * use git history to get copyright year * generation type is printed with inference parameters * fix unit test
37 lines
813 B
Python
37 lines
813 B
Python
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
import pytest
|
|
|
|
from data_designer.config.base import ConfigBase
|
|
from data_designer.config.utils.type_helpers import StrEnum
|
|
from data_designer.engine.configurable_task import ConfigurableTask
|
|
|
|
|
|
@pytest.fixture
|
|
def stub_config_class():
|
|
class MockConfig(ConfigBase):
|
|
value: str = "test"
|
|
|
|
return MockConfig
|
|
|
|
|
|
@pytest.fixture
|
|
def stub_task_class():
|
|
class MockTask(ConfigurableTask):
|
|
def _validate(self):
|
|
pass
|
|
|
|
def _initialize(self):
|
|
pass
|
|
|
|
return MockTask
|
|
|
|
|
|
@pytest.fixture
|
|
def stub_enum():
|
|
class MockEnum(StrEnum):
|
|
TEST_TASK = "test_task"
|
|
ANOTHER_TASK = "another_task"
|
|
|
|
return MockEnum
|