defer optional telemetry dependencies in perception graph
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
from collections.abc import Iterator
|
||||
from dataclasses import replace
|
||||
@@ -62,6 +64,23 @@ from k1link.perception.recorded_source import (
|
||||
)
|
||||
|
||||
|
||||
def test_graph_import_does_not_initialize_legacy_compute_dependencies() -> None:
|
||||
result = subprocess.run(
|
||||
[
|
||||
sys.executable,
|
||||
"-c",
|
||||
(
|
||||
"import sys; import k1link.perception.graph; "
|
||||
"assert 'k1link.compute' not in sys.modules"
|
||||
),
|
||||
],
|
||||
check=False,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
)
|
||||
assert result.returncode == 0, result.stderr
|
||||
|
||||
|
||||
def _status(available: bool = True) -> ModalityStatus:
|
||||
return ModalityStatus(
|
||||
available=available,
|
||||
|
||||
Reference in New Issue
Block a user