Added flake_name:str argument everywhere, nix fmt doesn't complain anymore

This commit is contained in:
2023-10-14 14:57:36 +02:00
parent 06d6edbfa7
commit 718f647774
28 changed files with 365 additions and 206 deletions

View File

@@ -2,7 +2,7 @@ from pathlib import Path
import pytest
from clan_cli.dirs import get_clan_flake_toplevel
from clan_cli.dirs import _get_clan_flake_toplevel
from clan_cli.errors import ClanError
@@ -11,12 +11,12 @@ def test_get_clan_flake_toplevel(
) -> None:
monkeypatch.chdir(temporary_dir)
with pytest.raises(ClanError):
print(get_clan_flake_toplevel())
print(_get_clan_flake_toplevel())
(temporary_dir / ".git").touch()
assert get_clan_flake_toplevel() == temporary_dir
assert _get_clan_flake_toplevel() == temporary_dir
subdir = temporary_dir / "subdir"
subdir.mkdir()
monkeypatch.chdir(subdir)
(subdir / ".clan-flake").touch()
assert get_clan_flake_toplevel() == subdir
assert _get_clan_flake_toplevel() == subdir