lol

python312Packages.llm-gguf: add tests

+27
+5
pkgs/development/python-modules/llm-gguf/default.nix
··· 1 1 { 2 2 lib, 3 + callPackage, 3 4 buildPythonPackage, 4 5 fetchFromGitHub, 5 6 ··· 38 39 39 40 # Tests require internet access (downloading models) 40 41 doCheck = false; 42 + 43 + passthru.tests = { 44 + llm-plugin = callPackage ./tests/llm-plugin.nix { }; 45 + }; 41 46 42 47 meta = { 43 48 description = "Run models distributed as GGUF files using LLM";
+22
pkgs/development/python-modules/llm-gguf/tests/llm-plugin.nix
··· 1 + { 2 + runCommand, 3 + python, 4 + yq, 5 + }: 6 + let 7 + venv = python.withPackages (ps: [ 8 + ps.llm 9 + ps.llm-gguf 10 + ]); 11 + in 12 + runCommand "llm-gguf-test-llm-plugin" 13 + { 14 + nativeBuildInputs = [ 15 + venv 16 + yq 17 + ]; 18 + } 19 + '' 20 + llm plugins | yq --exit-status 'any(.name == "llm-gguf")' 21 + touch "$out" 22 + ''