1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 packaging,
6 pytest,
7 setuptools-scm,
8 pytest7CheckHook,
9 pythonOlder,
10}:
11
12buildPythonPackage rec {
13 pname = "pytest-snapshot";
14 version = "0.9.0";
15 format = "setuptools";
16
17 disabled = pythonOlder "3.5";
18
19 src = fetchFromGitHub {
20 owner = "joseph-roitman";
21 repo = "pytest-snapshot";
22 tag = "v${version}";
23 hash = "sha256-0PZu9wL29iEppLxxbl4D0E4WfOHe61KUUld003cRBRU=";
24 };
25
26 nativeBuildInputs = [ setuptools-scm ];
27
28 buildInputs = [ pytest ];
29
30 propagatedBuildInputs = [ packaging ];
31
32 nativeCheckInputs = [
33 # https://github.com/joseph-roitman/pytest-snapshot/issues/71
34 pytest7CheckHook
35 ];
36
37 pythonImportsCheck = [ "pytest_snapshot" ];
38
39 meta = with lib; {
40 description = "Plugin to enable snapshot testing with pytest";
41 homepage = "https://github.com/joseph-roitman/pytest-snapshot/";
42 license = licenses.mit;
43 maintainers = [ ];
44 };
45}