From 74440de5ca9fcf173f7133ab2bbb903ee4fd9177 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 4 Jan 2021 10:49:41 +0100 Subject: [PATCH] pythonPackages.pytest-snapshot: init at 0.4.2 --- .../pytest-snapshot/default.nix | 26 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-snapshot/default.nix diff --git a/pkgs/development/python-modules/pytest-snapshot/default.nix b/pkgs/development/python-modules/pytest-snapshot/default.nix new file mode 100644 index 00000000000..42f399bb67f --- /dev/null +++ b/pkgs/development/python-modules/pytest-snapshot/default.nix @@ -0,0 +1,26 @@ +{ lib, buildPythonPackage, fetchPypi, packaging, pytest, setuptools-scm }: + +buildPythonPackage rec { + pname = "pytest-snapshot"; + version = "0.4.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "1p33fcplfykwf5mdwg25n8hjgzxpx8w1iprjnfzibpxclfrxmy5i"; + }; + + nativeBuildInputs = [ setuptools-scm ]; + + propagatedBuildInputs = [ packaging pytest ]; + + # pypi does not contain tests and GitHub archive is not supported because setuptools-scm can't detect the version + doCheck = false; + pythonImportsCheck = [ "pytest_snapshot" ]; + + meta = with lib; { + description = "A plugin to enable snapshot testing with pytest"; + homepage = "https://github.com/joseph-roitman/pytest-snapshot/"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ef32dfecf8f..a6bc60168f1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5946,6 +5946,8 @@ in { pytest-services = callPackage ../development/python-modules/pytest-services { }; + pytest-snapshot = callPackage ../development/python-modules/pytest-snapshot { }; + pytest-shutil = callPackage ../development/python-modules/pytest-shutil { }; pytest-socket = callPackage ../development/python-modules/pytest-socket { };