depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-snapshot/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

45 lines
956 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
packaging,
pytest,
setuptools-scm,
pytest7CheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "pytest-snapshot";
version = "0.9.0";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "joseph-roitman";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-0PZu9wL29iEppLxxbl4D0E4WfOHe61KUUld003cRBRU=";
};
nativeBuildInputs = [ setuptools-scm ];
buildInputs = [ pytest ];
propagatedBuildInputs = [ packaging ];
nativeCheckInputs = [
# https://github.com/joseph-roitman/pytest-snapshot/issues/71
pytest7CheckHook
];
pythonImportsCheck = [ "pytest_snapshot" ];
meta = with lib; {
description = "Plugin to enable snapshot testing with pytest";
homepage = "https://github.com/joseph-roitman/pytest-snapshot/";
license = licenses.mit;
maintainers = with maintainers; [ ];
};
}