mirror of
https://github.com/wassname/ray.git
synced 2026-07-13 17:45:08 +08:00
Fix no cpus test (#5009)
This commit is contained in:
@@ -56,6 +56,14 @@ def _ray_start(**kwargs):
|
||||
ray.shutdown()
|
||||
|
||||
|
||||
# The following fixture will start ray with 0 cpu.
|
||||
@pytest.fixture
|
||||
def ray_start_no_cpu(request):
|
||||
param = getattr(request, "param", {})
|
||||
with _ray_start(num_cpus=0, **param) as res:
|
||||
yield res
|
||||
|
||||
|
||||
# The following fixture will start ray with 1 cpu.
|
||||
@pytest.fixture
|
||||
def ray_start_regular(request):
|
||||
|
||||
Reference in New Issue
Block a user