From 713fa24837028f9d2a4ca056ccabf6871cd0c2d2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Dec 2022 15:13:19 +0100 Subject: [PATCH] python310Packages.pytest-freezer: init at 0.4.6 --- .../python-modules/pytest-freezer/default.nix | 52 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 54 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-freezer/default.nix diff --git a/pkgs/development/python-modules/pytest-freezer/default.nix b/pkgs/development/python-modules/pytest-freezer/default.nix new file mode 100644 index 000000000000..16eb2420f0e7 --- /dev/null +++ b/pkgs/development/python-modules/pytest-freezer/default.nix @@ -0,0 +1,52 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, freezegun +, hatchling +, pytest +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pytest-freezer"; + version = "0.4.6"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "pytest-dev"; + repo = pname; + rev = "refs/tags/${version}"; + hash = "sha256-0JZv6MavRceAV+ZOetCVxJEyttd5W3PCts6Fz2KQsh0="; + }; + + nativeBuildInputs = [ + hatchling + ]; + + buildInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + freezegun + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pytest_freezer" + ]; + + meta = with lib; { + description = "Pytest plugin providing a fixture interface for spulec/freezegun"; + homepage = "https://github.com/pytest-dev/pytest-freezer"; + changelog = "https://github.com/pytest-dev/pytest-freezer/releases/tag/${version}"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c66be90368c3..2d68168ab711 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8878,6 +8878,8 @@ self: super: with self; { pytest-freezegun = callPackage ../development/python-modules/pytest-freezegun { }; + pytest-freezer = callPackage ../development/python-modules/pytest-freezer { }; + pytest-golden = callPackage ../development/python-modules/pytest-golden { }; pytest-helpers-namespace = callPackage ../development/python-modules/pytest-helpers-namespace { };