chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 13:17:40 +08:00
commit f1825c8ceb
10096 changed files with 2364182 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import time
import pytest
import ray
@pytest.fixture(autouse=True)
def disallow_ray_init(monkeypatch):
def raise_on_init(*args, **kwargs):
raise RuntimeError("Unit tests should not depend on Ray being initialized.")
monkeypatch.setattr(ray, "init", raise_on_init)
@pytest.fixture(autouse=True)
def disallow_time_sleep(monkeypatch):
def raise_on_sleep(seconds):
raise RuntimeError(
f"Unit tests should not use time.sleep({seconds}). "
"Unit tests should be fast and deterministic."
)
monkeypatch.setattr(time, "sleep", raise_on_sleep)