test(smolmachines): annotate pyright test helpers
This commit is contained in:
@@ -361,7 +361,7 @@ class TestForceAllowlist(unittest.TestCase):
|
|||||||
# force_allowlist must fail closed rather than boot the VM.
|
# force_allowlist must fail closed rather than boot the VM.
|
||||||
original = loopback_alias._read_machine_cfg
|
original = loopback_alias._read_machine_cfg
|
||||||
|
|
||||||
def stale_cfg(con, name):
|
def stale_cfg(con: sqlite3.Connection, name: str) -> dict[str, object]:
|
||||||
# Always report the un-patched row so the post-write
|
# Always report the un-patched row so the post-write
|
||||||
# verification never sees the requested cidrs.
|
# verification never sees the requested cidrs.
|
||||||
cfg = original(con, name)
|
cfg = original(con, name)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class TestKvmPreflight(unittest.TestCase):
|
|||||||
"""Linux-only KVM gate: smolvm needs /dev/kvm present and
|
"""Linux-only KVM gate: smolvm needs /dev/kvm present and
|
||||||
accessible. macOS skips this entirely (Hypervisor.framework)."""
|
accessible. macOS skips this entirely (Hypervisor.framework)."""
|
||||||
|
|
||||||
def _run(self, *, system, exists, access):
|
def _run(self, *, system: str, exists: bool, access: bool) -> None:
|
||||||
with patch(
|
with patch(
|
||||||
"bot_bottle.backend.smolmachines.util.shutil.which",
|
"bot_bottle.backend.smolmachines.util.shutil.which",
|
||||||
return_value="/usr/bin/smolvm",
|
return_value="/usr/bin/smolvm",
|
||||||
|
|||||||
Reference in New Issue
Block a user