summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/hypothesmith/default.nix
blob: 4870b632f0704b2e6284dc481bf7278878494764 (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
57
58
{
  lib,
  black,
  buildPythonPackage,
  fetchPypi,
  hypothesis,
  lark,
  libcst,
  parso,
  pytestCheckHook,
  pytest-cov-stub,
  pytest-xdist,
  setuptools,
}:

buildPythonPackage rec {
  pname = "hypothesmith";
  version = "0.3.3";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-lsFIAtbI6F2JdSZBdoeNtUso0u2SH9v+3C5rjOPIFxY=";
  };

  build-system = [ setuptools ];

  dependencies = [
    hypothesis
    lark
    libcst
  ];

  nativeCheckInputs = [
    black
    parso
    pytestCheckHook
    pytest-cov-stub
    pytest-xdist
  ];

  disabledTests = [
    # super slow
    "test_source_code_from_libcst_node_type"
    # https://github.com/Zac-HD/hypothesmith/issues/38
    "test_black_autoformatter_from_grammar"
  ];

  pythonImportsCheck = [ "hypothesmith" ];

  meta = {
    description = "Hypothesis strategies for generating Python programs, something like CSmith";
    homepage = "https://github.com/Zac-HD/hypothesmith";
    changelog = "https://github.com/Zac-HD/hypothesmith/blob/master/CHANGELOG.md";
    license = lib.licenses.mpl20;
    maintainers = [ ];
  };
}