From a4992873d419222fe2bbc7e9cc6d0f8049b44ee1 Mon Sep 17 00:00:00 2001 From: Binyao Jiang Date: Wed, 10 Dec 2025 15:28:21 -0800 Subject: [PATCH] Treat unittest SkipTest exception as pass instead of as failure (#14847) --- python/sglang/srt/utils/common.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/sglang/srt/utils/common.py b/python/sglang/srt/utils/common.py index 118d24f2d..5b44d3d19 100644 --- a/python/sglang/srt/utils/common.py +++ b/python/sglang/srt/utils/common.py @@ -71,6 +71,7 @@ from typing import ( TypeVar, Union, ) +from unittest import SkipTest from urllib.parse import urlparse import numpy as np @@ -2540,6 +2541,9 @@ def retry( for try_index in itertools.count(): try: return fn() + except SkipTest: + # Do NOT retry skipped tests - used in CI and unittest + raise except Exception as e: traceback.print_exc()