blob: 4167ab618d6a072db80fbfd5cb2a2db036a49344 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{
lib,
atomicwrites,
buildPythonPackage,
fetchFromGitHub,
ruamel-yaml,
poetry-core,
pytest,
pytestCheckHook,
testfixtures,
}:
buildPythonPackage rec {
pname = "pytest-golden";
version = "0.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "oprypin";
repo = "pytest-golden";
tag = "v${version}";
hash = "sha256-l5fXWDK6gWJc3dkYFTokI9tWvawMRnF0td/lSwqkYXE=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "poetry>=0.12" poetry-core \
--replace-fail poetry.masonry.api poetry.core.masonry.api
'';
pythonRelaxDeps = [ "testfixtures" ];
build-system = [
# hatchling used for > 0.2.2
poetry-core
];
buildInputs = [ pytest ];
dependencies = [
atomicwrites
ruamel-yaml
testfixtures
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "pytest_golden" ];
meta = {
description = "Plugin for pytest that offloads expected outputs to data files";
homepage = "https://github.com/oprypin/pytest-golden";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}
|