From 71affb0d731d5244956830d46237bb9cb6bfdbcb Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Sat, 30 Sep 2023 22:18:31 +0200 Subject: [PATCH] python310Packages.pytest-spec: init at unstable-2023-06-04 --- .../python-modules/pytest-spec/default.nix | 50 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-spec/default.nix diff --git a/pkgs/development/python-modules/pytest-spec/default.nix b/pkgs/development/python-modules/pytest-spec/default.nix new file mode 100644 index 000000000000..4a73084bd452 --- /dev/null +++ b/pkgs/development/python-modules/pytest-spec/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, poetry-core +, pytest +, pytestCheckHook +, pytest-describe +, pytest-cov +}: + +buildPythonPackage rec { + pname = "pytest-spec"; + version = "unstable-2023-06-04"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pchomik"; + repo = "pytest-spec"; + rev = "e16e0550dd6bc557411e4312b7b42d53b26e69ef"; + hash = "sha256-dyDUdZJU4E4y1yCzunAX2c48Qv6ogu0b60U/5YbJvIU="; + }; + + postPatch = '' + sed -i '/addopts/d' setup.cfg + # TODO: upstream + substituteInPlace pyproject.toml \ + --replace "poetry>=0.12" "poetry-core" \ + --replace "poetry.masonry.api" "poetry.core.masonry.api" + ''; + + nativeBuildInputs = [ poetry-core ]; + + buildInputs = [ pytest ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-describe + ]; + + pytestFlagsArray = [ "--spec" ]; + + pythonImportsCheck = [ "pytest_spec" ]; + + meta = { + description = "A pytest plugin to display test execution output like a SPECIFICATION"; + homepage = "https://github.com/pchomik/pytest-spec"; + license = lib.licenses.gpl2Plus; + maintainers = with lib.maintainers; [ tomasajt ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fdf90d36ba3d..8ee05ca2c3c6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10417,6 +10417,8 @@ self: super: with self; { pytest-shutil = callPackage ../development/python-modules/pytest-shutil { }; + pytest-spec = callPackage ../development/python-modules/pytest-spec { }; + python-status = callPackage ../development/python-modules/python-status { }; python-string-utils = callPackage ../development/python-modules/python-string-utils { };