about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pytest-regressions
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-06-22 15:01:47 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-22 16:57:59 +0000
commit633cab0ecb07627706c6b523e219490f019eaab5 (patch)
tree4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/python-modules/pytest-regressions
parentffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff)
parent432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff)
downloadnixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst
nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts:
#	nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix
#	nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix
#	nixpkgs/pkgs/applications/window-managers/sway/default.nix
#	nixpkgs/pkgs/build-support/rust/default.nix
#	nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pytest-regressions')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pytest-regressions/default.nix59
1 files changed, 59 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pytest-regressions/default.nix b/nixpkgs/pkgs/development/python-modules/pytest-regressions/default.nix
new file mode 100644
index 000000000000..90b72c886eac
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/pytest-regressions/default.nix
@@ -0,0 +1,59 @@
+{ lib
+, buildPythonPackage
+, fetchpatch
+, fetchPypi
+, pythonOlder
+, matplotlib
+, numpy
+, pandas
+, pillow
+, pytest
+, pytest-datadir
+, pytestCheckHook
+, pyyaml
+, setuptools-scm
+}:
+
+buildPythonPackage rec {
+  pname = "pytest-regressions";
+  version = "2.2.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.6";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "15a71f77cb266dd4ca94331abe4c339ad056b2b2175e47442711c98cf6d65716";
+  };
+
+  patches = [
+    # Make pytest-regressions compatible with NumPy 1.20.
+    # Should be part of the next release.
+    (fetchpatch {
+      url = "https://github.com/ESSS/pytest-regressions/commit/ffad2c7fd1d110f420f4e3ca3d39d90cae18a972.patch";
+      sha256 = "sha256-bUna7MnMV6u9oEaZMsFnr4gE28rz/c0O2+Hyk291+l0=";
+    })
+  ];
+
+  nativeBuildInputs = [ setuptools-scm ];
+  buildInputs = [ pytest ];
+  propagatedBuildInputs = [ numpy pandas pillow pytest-datadir pyyaml ];
+
+  SETUPTOOLS_SCM_PRETEND_VERSION = version;
+
+  checkInputs = [ pytestCheckHook matplotlib ];
+  pythonImportsCheck = [ "pytest_regressions" "pytest_regressions.plugin" ];
+
+  meta = with lib; {
+    description = "Pytest fixtures to write regression tests";
+    longDescription = ''
+      pytest-regressions makes it simple to test general data, images,
+      files, and numeric tables by saving expected data in a data
+      directory (courtesy of pytest-datadir) that can be used to verify
+      that future runs produce the same data.
+    '';
+    homepage = "https://github.com/ESSS/pytest-regressions";
+    license = licenses.mit;
+    maintainers = with maintainers; [ AluisioASG ];
+  };
+}