1{
2 lib,
3 asttokens,
4 black,
5 buildPythonPackage,
6 click,
7 dirty-equals,
8 executing,
9 fetchFromGitHub,
10 hypothesis,
11 poetry-core,
12 pyright,
13 pytest-subtests,
14 pytest-xdist,
15 pytestCheckHook,
16 pythonOlder,
17 rich,
18 time-machine,
19 toml,
20 types-toml,
21}:
22
23buildPythonPackage rec {
24 pname = "inline-snapshot";
25 version = "0.10.2";
26 pyproject = true;
27
28 disabled = pythonOlder "3.10";
29
30 src = fetchFromGitHub {
31 owner = "15r10nk";
32 repo = "inline-snapshot";
33 rev = "refs/tags/v${version}";
34 hash = "sha256-19rvhqYkM3QiD0La5TRi/2uKza8HW/bnXeGAhOZ/bgs=";
35 };
36
37 build-system = [ poetry-core ];
38
39 dependencies = [
40 asttokens
41 black
42 click
43 executing
44 rich
45 toml
46 types-toml
47 ];
48
49 nativeCheckInputs = [
50 dirty-equals
51 hypothesis
52 pyright
53 pytest-subtests
54 pytest-xdist
55 pytestCheckHook
56 time-machine
57 ];
58
59 pythonImportsCheck = [ "inline_snapshot" ];
60
61 disabledTestPaths = [
62 # Tests don't play nice with pytest-xdist
63 "tests/test_typing.py"
64 ];
65
66 meta = with lib; {
67 description = "Create and update inline snapshots in Python tests";
68 homepage = "https://github.com/15r10nk/inline-snapshot/";
69 changelog = "https://github.com/15r10nk/inline-snapshot/blob/${version}/CHANGELOG.md";
70 license = licenses.mit;
71 maintainers = with maintainers; [ fab ];
72 };
73}