Spaces:
Running on Zero
Running on Zero
fix: cap zerogpu allocation duration
Browse files
tests/test_model_runtime.py
CHANGED
|
@@ -172,3 +172,7 @@ def test_zerogpu_duration_validates_positive_values(monkeypatch: pytest.MonkeyPa
|
|
| 172 |
monkeypatch.setenv("ADVISOR_ZERO_GPU_DURATION", "0")
|
| 173 |
with pytest.raises(RuntimeError, match="positive"):
|
| 174 |
zero_gpu_duration_seconds()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
monkeypatch.setenv("ADVISOR_ZERO_GPU_DURATION", "0")
|
| 173 |
with pytest.raises(RuntimeError, match="positive"):
|
| 174 |
zero_gpu_duration_seconds()
|
| 175 |
+
|
| 176 |
+
monkeypatch.setenv("ADVISOR_ZERO_GPU_DURATION", "121")
|
| 177 |
+
with pytest.raises(RuntimeError, match="at most 120"):
|
| 178 |
+
zero_gpu_duration_seconds()
|