lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

python312Packages.llm-anthropic: add tests

+27
+5
pkgs/development/python-modules/llm-anthropic/default.nix
··· 1 1 { 2 2 lib, 3 + callPackage, 3 4 buildPythonPackage, 4 5 fetchFromGitHub, 5 6 setuptools, ··· 44 45 pythonImportsCheck = [ "llm_anthropic" ]; 45 46 46 47 passthru.updateScript = nix-update-script { }; 48 + 49 + passthru.tests = { 50 + llm-plugin = callPackage ./tests/llm-plugin.nix { }; 51 + }; 47 52 48 53 meta = { 49 54 description = "LLM access to models by Anthropic, including the Claude series";
+22
pkgs/development/python-modules/llm-anthropic/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-anthropic 10 + ]); 11 + in 12 + runCommand "llm-anthropic-test-llm-plugin" 13 + { 14 + nativeBuildInputs = [ 15 + venv 16 + yq 17 + ]; 18 + } 19 + '' 20 + llm plugins | yq --exit-status 'any(.name == "llm-anthropic")' 21 + touch "$out" 22 + ''