12 lines
340 B
Python
12 lines
340 B
Python
from nebulaforge.runtime import DeviceRuntime
|
|
|
|
def test_runtime_basic():
|
|
rt = DeviceRuntime(device="cpu-test")
|
|
rt.initialize()
|
|
res = rt.infer({"input": 1})
|
|
assert isinstance(res, dict)
|
|
assert res.get("result") == {"input": 1}
|
|
pl = rt.plan({"state": 42})
|
|
assert isinstance(pl, dict)
|
|
assert "plan_delta" in pl
|