"""Fixtures shared by every test tree.""" from collections.abc import Iterator from pathlib import Path import pytest from nisse_core.execution.ssh import SSHHost from nisse_core.execution.testing import local_sshd @pytest.fixture(scope="session") def ssh_host(tmp_path_factory: pytest.TempPathFactory) -> Iterator[SSHHost]: """A throwaway sshd on this machine, standing in for the build VM (L13). It runs as the current user, so remote paths are this machine's paths and tests can inspect what a command did.""" with local_sshd(Path(tmp_path_factory.mktemp("sshd"))) as host: yield host