vscode-extensions.yoavbls.pretty-ts-errors: 0.5.4 -> 0.6.1 (#363464)
[NixPkgs.git] / pkgs / development / python-modules / pytest-golden / default.nix
blobbf2de36a148ee2ffbceb0d1a766f43fd43efd006
2   lib,
3   atomicwrites,
4   buildPythonPackage,
5   fetchFromGitHub,
6   #, hatchling
7   ruamel-yaml,
8   poetry-core,
9   pytest,
10   pytest-asyncio,
11   pytestCheckHook,
12   pythonOlder,
13   testfixtures,
16 buildPythonPackage rec {
17   pname = "pytest-golden";
18   version = "0.2.2";
19   format = "pyproject";
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "oprypin";
25     repo = pname;
26     tag = "v${version}";
27     hash = "sha256-l5fXWDK6gWJc3dkYFTokI9tWvawMRnF0td/lSwqkYXE=";
28   };
30   postPatch = ''
31     substituteInPlace pyproject.toml \
32       --replace "poetry>=0.12" poetry-core \
33       --replace poetry.masonry.api poetry.core.masonry.api
34   '';
36   pythonRelaxDeps = [ "testfixtures" ];
38   nativeBuildInputs = [
39     # hatchling used for > 0.2.2
40     poetry-core
41   ];
43   buildInputs = [ pytest ];
45   propagatedBuildInputs = [
46     atomicwrites
47     ruamel-yaml
48     testfixtures
49   ];
51   nativeCheckInputs = [
52     pytest-asyncio
53     pytestCheckHook
54   ];
56   pythonImportsCheck = [ "pytest_golden" ];
58   meta = with lib; {
59     description = "Plugin for pytest that offloads expected outputs to data files";
60     homepage = "https://github.com/oprypin/pytest-golden";
61     license = licenses.mit;
62     maintainers = with maintainers; [ fab ];
63   };