Unverified Commit 0078e283 authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

feat(tests): add pytest markers to tests not picked up by CI (#7936)


Signed-off-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
Co-authored-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
parent d42ff092
...@@ -11,6 +11,13 @@ from dynamo.common.memory.multimodal_embedding_cache_manager import ( ...@@ -11,6 +11,13 @@ from dynamo.common.memory.multimodal_embedding_cache_manager import (
MultimodalEmbeddingCacheManager, MultimodalEmbeddingCacheManager,
) )
# Total runtime ~0.67s — no need for parallel marker.
pytestmark = [
pytest.mark.gpu_0,
pytest.mark.pre_merge,
pytest.mark.integration,
]
class TestMultimodalEmbeddingCacheManagerBasicOperations: class TestMultimodalEmbeddingCacheManagerBasicOperations:
"""Tests for basic get/set operations.""" """Tests for basic get/set operations."""
......
...@@ -14,6 +14,13 @@ from dynamo.common.memory.multimodal_embedding_cache_manager import ( ...@@ -14,6 +14,13 @@ from dynamo.common.memory.multimodal_embedding_cache_manager import (
) )
from dynamo.common.multimodal.async_encoder_cache import AsyncEncoderCache from dynamo.common.multimodal.async_encoder_cache import AsyncEncoderCache
# Total runtime ~0.75s — no need for parallel marker.
pytestmark = [
pytest.mark.gpu_0,
pytest.mark.pre_merge,
pytest.mark.integration,
]
class TestAsyncEncoderCacheBasicOperations: class TestAsyncEncoderCacheBasicOperations:
"""Tests for basic operations.""" """Tests for basic operations."""
......
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
"""Unit tests for AsyncEncoderCache.""" """Unit tests for embedding transfer (local, NIXL write, NIXL read, ring buffer)."""
import asyncio import asyncio
import logging import logging
...@@ -23,6 +23,14 @@ from dynamo.common.multimodal.embedding_transfer import ( ...@@ -23,6 +23,14 @@ from dynamo.common.multimodal.embedding_transfer import (
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
# GPU tier is set per-class/per-test below (gpu_0 for local/ring buffer, gpu_1
# for NIXL which requires CUDA). Total runtime ~1.6s for gpu_0 subset — no
# need for parallel marker.
pytestmark = [
pytest.mark.pre_merge,
pytest.mark.integration,
]
EMBEDDING_SIZE = 8 * 1024 EMBEDDING_SIZE = 8 * 1024
......
...@@ -10,8 +10,17 @@ to <think> blocks in the content field before chat template rendering. ...@@ -10,8 +10,17 @@ to <think> blocks in the content field before chat template rendering.
import copy import copy
import pytest
from dynamo.common.utils.input_params import _inject_reasoning_content from dynamo.common.utils.input_params import _inject_reasoning_content
# Total runtime ~0.04s — no need for parallel marker.
pytestmark = [
pytest.mark.gpu_0,
pytest.mark.pre_merge,
pytest.mark.integration,
]
class TestInjectReasoningContent: class TestInjectReasoningContent:
"""Test suite for _inject_reasoning_content""" """Test suite for _inject_reasoning_content"""
......
...@@ -11,6 +11,13 @@ modifying the source metrics. ...@@ -11,6 +11,13 @@ modifying the source metrics.
import pytest import pytest
from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram, Summary from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram, Summary
# Total runtime ~0.05s — no need for parallel marker.
pytestmark = [
pytest.mark.gpu_0,
pytest.mark.pre_merge,
pytest.mark.integration,
]
class TestLabelInjectingCollector: class TestLabelInjectingCollector:
"""Test suite for LabelInjectingCollector""" """Test suite for LabelInjectingCollector"""
......
...@@ -10,6 +10,16 @@ upgrades that break our integration surface are caught immediately. ...@@ -10,6 +10,16 @@ upgrades that break our integration surface are caught immediately.
import inspect import inspect
import pickle import pickle
import pytest
# Total runtime ~0.08s — no need for parallel marker.
pytestmark = [
pytest.mark.unit,
pytest.mark.sglang,
pytest.mark.gpu_1,
pytest.mark.pre_merge,
]
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Import tests -- verify all required modules and symbols exist # Import tests -- verify all required modules and symbols exist
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
......
...@@ -29,6 +29,14 @@ from dynamo.frontend.sglang_processor import ( ...@@ -29,6 +29,14 @@ from dynamo.frontend.sglang_processor import (
) )
from dynamo.frontend.utils import PreprocessError, random_call_id, random_uuid from dynamo.frontend.utils import PreprocessError, random_call_id, random_uuid
# Needs sglang packages (gpu_1 container). No need for parallel marker.
pytestmark = [
pytest.mark.unit,
pytest.mark.sglang,
pytest.mark.gpu_1,
pytest.mark.pre_merge,
]
MODEL = "Qwen/Qwen3-0.6B" MODEL = "Qwen/Qwen3-0.6B"
......
...@@ -20,6 +20,14 @@ from sglang.srt.utils.hf_transformers_utils import get_tokenizer ...@@ -20,6 +20,14 @@ from sglang.srt.utils.hf_transformers_utils import get_tokenizer
from dynamo.frontend.sglang_prepost import SglangStreamingPostProcessor from dynamo.frontend.sglang_prepost import SglangStreamingPostProcessor
# Needs sglang packages (gpu_1 container). No need for parallel marker.
pytestmark = [
pytest.mark.unit,
pytest.mark.sglang,
pytest.mark.gpu_1,
pytest.mark.pre_merge,
]
MODEL = "Qwen/Qwen3-0.6B" MODEL = "Qwen/Qwen3-0.6B"
......
...@@ -12,6 +12,14 @@ from transformers import AutoTokenizer ...@@ -12,6 +12,14 @@ from transformers import AutoTokenizer
from dynamo.frontend.prepost import _prepare_request from dynamo.frontend.prepost import _prepare_request
# Needs vllm packages (gpu_1 container). No need for parallel marker.
pytestmark = [
pytest.mark.unit,
pytest.mark.vllm,
pytest.mark.gpu_1,
pytest.mark.pre_merge,
]
MODEL = "Qwen/Qwen3-0.6B" MODEL = "Qwen/Qwen3-0.6B"
TOOL_REQUEST = { TOOL_REQUEST = {
......
...@@ -7,6 +7,14 @@ import pytest ...@@ -7,6 +7,14 @@ import pytest
from dynamo.trtllm.dynamic_flags import infer_type, parse_dynamic_flags, set_nested from dynamo.trtllm.dynamic_flags import infer_type, parse_dynamic_flags, set_nested
# Total runtime ~0.03s — no need for parallel marker.
pytestmark = [
pytest.mark.unit,
pytest.mark.trtllm,
pytest.mark.gpu_0,
pytest.mark.pre_merge,
]
class TestInferType: class TestInferType:
def test_int(self): def test_int(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment