diff --git a/pkgs/development/python-modules/pytest-lsp/default.nix b/pkgs/development/python-modules/pytest-lsp/default.nix new file mode 100644 index 0000000000000..4fa32e477d790 --- /dev/null +++ b/pkgs/development/python-modules/pytest-lsp/default.nix @@ -0,0 +1,47 @@ +{ + lib, + fetchPypi, + buildPythonPackage, + hatchling, + pygls, + pytestCheckHook, + pytest-asyncio, +}: + +buildPythonPackage rec { + pname = "pytest-lsp"; + version = "0.4.3"; + pyproject = true; + + src = fetchPypi { + inherit version; + pname = "pytest_lsp"; + hash = "sha256-ND9r2i+qMg7V/Ld8lCDScDzlZdHRRP6CfjGYp9wpkRw="; + }; + + build-system = [ + hatchling + ]; + + dependencies = [ + pygls + pytest-asyncio + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pytest_lsp" ]; + + meta = { + homepage = "https://github.com/swyddfa/lsp-devtools"; + changelog = "https://github.com/swyddfa/lsp-devtools/blob/develop/lib/pytest-lsp/CHANGES.md"; + description = "Pytest plugin for writing end-to-end tests for language servers"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ + clemjvdm + fliegendewurst + ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7a1259039077f..5dfba3db45659 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10552,6 +10552,8 @@ self: super: with self; { pytask = callPackage ../development/python-modules/pytask { }; + pytest-lsp = callPackage ../development/python-modules/pytest-lsp { }; + pytest-mockito = callPackage ../development/python-modules/pytest-mockito { }; pytest-pudb = callPackage ../development/python-modules/pytest-pudb { };