[misc] Remove unit test cases that fail the admission criteria (round 2) (#30703)

This commit is contained in:
Liangsheng Yin
2026-07-09 16:35:59 -07:00
committed by GitHub
parent b86466d54b
commit a36c873147
24 changed files with 29 additions and 770 deletions
@@ -22,27 +22,6 @@ register_cpu_ci(est_time=7, suite="base-a-test-cpu")
register_cpu_ci(est_time=7, suite="base-c-test-cpu")
class TestFimPosition(CustomTestCase):
def test_middle_and_end_are_distinct(self):
"""Test that MIDDLE and END are different enum values."""
self.assertNotEqual(FimPosition.MIDDLE, FimPosition.END)
class TestCompletionTemplate(CustomTestCase):
def test_dataclass_fields(self):
"""Test creating a CompletionTemplate with all fields."""
t = CompletionTemplate(
name="test",
fim_begin_token="<begin>",
fim_middle_token="<middle>",
fim_end_token="<end>",
fim_position=FimPosition.MIDDLE,
)
self.assertEqual(t.name, "test")
self.assertEqual(t.fim_begin_token, "<begin>")
self.assertEqual(t.fim_position, FimPosition.MIDDLE)
class TestRegisterCompletionTemplate(CustomTestCase):
def test_builtin_templates_registered(self):
"""Test that deepseek_coder, star_coder, qwen_coder are pre-registered."""
@@ -102,46 +102,6 @@ class TestTemplateContentFormatDetection(CustomTestCase):
result = detect_jinja_template_content_format(msg_content_pattern)
self.assertEqual(result, "openai")
def test_detect_m_content_pattern(self):
"""Test detection of template with m.content pattern (should be 'openai' format)."""
msg_content_pattern = """
[gMASK]<sop>
{%- for m in messages %}
{%- if m.role == 'system' %}
<|system|>
{{ m.content }}
{%- elif m.role == 'user' %}
<|user|>{{ '\n' }}
{%- if m.content is string %}
{{ m.content }}
{%- else %}
{%- for item in m.content %}
{%- if item.type == 'video' or 'video' in item %}
<|begin_of_video|><|video|><|end_of_video|>
{%- elif item.type == 'image' or 'image' in item %}
<|begin_of_image|><|image|><|end_of_image|>
{%- elif item.type == 'text' %}
{{ item.text }}
{%- endif %}
{%- endfor %}
{%- endif %}
{%- elif m.role == 'assistant' %}
{%- if m.metadata %}
<|assistant|>{{ m.metadata }}
{{ m.content }}
{%- else %}
<|assistant|>
{{ m.content }}
{%- endif %}
{%- endif %}
{%- endfor %}
{% if add_generation_prompt %}<|assistant|>
{% endif %}
"""
result = detect_jinja_template_content_format(msg_content_pattern)
self.assertEqual(result, "openai")
def test_process_content_openai_format(self):
"""Test content processing for openai format."""
msg_dict = {
@@ -583,19 +583,6 @@ class TestToolCallParserDetection(unittest.TestCase):
self.assertLess(minicpm5_idx, rule_names.index("mimo"))
self.assertLess(minicpm5_idx, rule_names.index("qwen"))
def test_minicpm5_not_misclassified_as_qwen(self):
template = (
"{% set enable_thinking = enable_thinking if enable_thinking is defined else true %}"
'\n<function name="{{ tool.name }}">'
'\n<param name="{{ param.name }}">{{ param.value }}</param>'
"\n</function>"
)
force, config = detect_reasoning_pattern(template)
result = detect_tool_call_parser(
template, _DummyTokenizer(["<function", "<param"]), config, force
)
self.assertEqual(result, "minicpm5")
class TestResolveAutoParsers(unittest.TestCase):
"""Tests for resolve_auto_parsers()."""