Files
clan-core/pkgs/clan-cli/tests/clan_flake.py
2023-07-28 12:54:49 +02:00

18 lines
433 B
Python

from pathlib import Path
from typing import Iterator
import pytest
from environment import mock_env
@pytest.fixture
def clan_flake(
temporary_directory: Path, monkeypatch: pytest.MonkeyPatch
) -> Iterator[Path]:
flake = temporary_directory / "clan-flake"
flake.mkdir()
(flake / ".clan-flake").touch()
monkeypatch.chdir(flake)
with mock_env(HOME=str(temporary_directory)):
yield temporary_directory