From 9cdc6a27b624240c4fac92578f5e5c2f1b0931b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 14 Aug 2025 16:53:39 +0200 Subject: [PATCH] test_copy_from_nixstore_symlink: drop test. seems a bit overkill to have a test for two lines of python code... --- .../clan_cli/tests/test_clan_nix_attrset.py | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py b/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py index 21e769956..c7cab612c 100644 --- a/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py +++ b/pkgs/clan-cli/clan_cli/tests/test_clan_nix_attrset.py @@ -2,34 +2,11 @@ from pathlib import Path import pytest from clan_cli.tests.fixtures_flakes import FlakeForTest -from clan_lib.cmd import run from clan_lib.flake import Flake -from clan_lib.nix import nix_command from clan_lib.templates import list_templates from clan_lib.templates.filesystem import copy_from_nixstore -@pytest.mark.with_core -def test_copy_from_nixstore_symlink( - monkeypatch: pytest.MonkeyPatch, temporary_home: Path -) -> None: - src = temporary_home / "src" - src.mkdir() - (src / "file.txt").write_text("magicstring!") - res = run(nix_command(["store", "add", str(src)])) - src_nix = Path(res.stdout.strip()) - src2 = temporary_home / "src2" - src2.mkdir() - (src2 / "file.txt").symlink_to(src_nix / "file.txt") - res = run(nix_command(["store", "add", str(src2)])) - src2_nix = Path(res.stdout.strip()) - dest = temporary_home / "dest" - copy_from_nixstore(src2_nix, dest) - assert (dest / "file.txt").exists() - assert (dest / "file.txt").read_text() == "magicstring!" - assert (dest / "file.txt").is_symlink() - - @pytest.mark.with_core def test_clan_core_templates( test_flake_with_core: FlakeForTest,