From b774afb6b0d0e4b9380555cee30947acf22499ec Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 30 Mar 2026 20:25:58 -0700 Subject: [PATCH] fix(resources): add expires_at sentinel comment; move pytest import to module level --- circuitforge_core/resources/models.py | 2 +- tests/test_resources/test_models.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/circuitforge_core/resources/models.py b/circuitforge_core/resources/models.py index 45c6829..53b4886 100644 --- a/circuitforge_core/resources/models.py +++ b/circuitforge_core/resources/models.py @@ -13,7 +13,7 @@ class VRAMLease: mb_granted: int holder_service: str priority: int - expires_at: float + expires_at: float # unix timestamp; 0.0 = no expiry @classmethod def create( diff --git a/tests/test_resources/test_models.py b/tests/test_resources/test_models.py index cdef834..c8e5ac4 100644 --- a/tests/test_resources/test_models.py +++ b/tests/test_resources/test_models.py @@ -1,4 +1,5 @@ import time +import pytest from circuitforge_core.resources.models import VRAMLease, GpuInfo, NodeInfo @@ -27,7 +28,6 @@ def test_vram_lease_create_no_ttl_has_zero_expiry(): def test_vram_lease_is_immutable(): lease = VRAMLease.create(gpu_id=0, node_id="heimdall", mb=1024, service="snipe", priority=2) - import pytest with pytest.raises((AttributeError, TypeError)): lease.mb_granted = 999 # type: ignore