write test for get_clan_flake_toplevel

This commit is contained in:
Jörg Thalheim
2023-07-28 12:12:37 +02:00
committed by Mic92
parent df6e94b20e
commit 5e5fbfcf06
4 changed files with 38 additions and 8 deletions

View File

@@ -0,0 +1,14 @@
from pathlib import Path
import pytest
from clan_cli.dirs import get_clan_flake_toplevel
from clan_cli.errors import ClanError
def test_get_clan_flake_toplevel(
monkeypatch: pytest.MonkeyPatch, temporary_dir: Path
) -> None:
monkeypatch.chdir(temporary_dir)
with pytest.raises(ClanError):
get_clan_flake_toplevel()