[fix] Wrap the sp_shard test entry point in sys.exit so failures propagate (#30138)

This commit is contained in:
Cheng Wan
2026-07-04 14:23:40 -07:00
committed by GitHub
parent 63c4996fef
commit 00f088f6be
@@ -1,5 +1,7 @@
"""Unit tests for the unified SP shard helpers (pure logic, no distributed).""" """Unit tests for the unified SP shard helpers (pure logic, no distributed)."""
import sys
import pytest import pytest
import torch import torch
@@ -210,4 +212,4 @@ def test_gather_seq_trims(monkeypatch):
if __name__ == "__main__": if __name__ == "__main__":
pytest.main([__file__, "-q"]) sys.exit(pytest.main([__file__, "-q"]))