2023-10-25 17:23:28 +00:00
|
|
|
# from clan_cli.dirs import _get_clan_flake_toplevel
|
2023-07-28 10:12:37 +00:00
|
|
|
|
2023-10-25 17:23:28 +00:00
|
|
|
# TODO: Reimplement test?
|
|
|
|
# def test_get_clan_flake_toplevel(
|
|
|
|
# monkeypatch: pytest.MonkeyPatch, temporary_home: Path
|
|
|
|
# ) -> None:
|
|
|
|
# monkeypatch.chdir(temporary_home)
|
|
|
|
# with pytest.raises(ClanError):
|
|
|
|
# print(_get_clan_flake_toplevel())
|
|
|
|
# (temporary_home / ".git").touch()
|
|
|
|
# assert _get_clan_flake_toplevel() == temporary_home
|
2023-07-28 10:12:37 +00:00
|
|
|
|
2023-10-25 17:23:28 +00:00
|
|
|
# subdir = temporary_home / "subdir"
|
|
|
|
# subdir.mkdir()
|
|
|
|
# monkeypatch.chdir(subdir)
|
|
|
|
# (subdir / ".clan-flake").touch()
|
|
|
|
# assert _get_clan_flake_toplevel() == subdir
|