diff options
Diffstat (limited to 'pkgs/development/python-modules/hypothesmith/default.nix')
-rw-r--r-- | pkgs/development/python-modules/hypothesmith/default.nix | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/hypothesmith/default.nix b/pkgs/development/python-modules/hypothesmith/default.nix index 33174deb657..4bac9c0bb02 100644 --- a/pkgs/development/python-modules/hypothesmith/default.nix +++ b/pkgs/development/python-modules/hypothesmith/default.nix @@ -1,4 +1,13 @@ -{ lib, buildPythonPackage, fetchPypi, hypothesis, lark, libcst, black, parso, pytestCheckHook, pytest-cov, pytest-xdist }: +{ lib +, buildPythonPackage +, fetchPypi +, hypothesis +, lark +, libcst +, parso +, pytestCheckHook +, pytest-xdist +}: buildPythonPackage rec { pname = "hypothesmith"; @@ -9,17 +18,32 @@ buildPythonPackage rec { sha256 = "0fb7b3fd03d76eddd4474b0561e1c2662457593a74cc300fd27e5409cd4d7922"; }; + patches = [ + ./remove-black.patch + ]; + postPatch = '' - substituteInPlace setup.py --replace "lark-parser" "lark" + substituteInPlace setup.py \ + --replace "lark-parser" "lark" + + substituteInPlace tox.ini \ + --replace "--cov=hypothesmith" "" \ + --replace "--cov-branch" "" \ + --replace "--cov-report=term-missing:skip-covered" "" \ + --replace "--cov-fail-under=100" "" ''; propagatedBuildInputs = [ hypothesis lark libcst ]; - checkInputs = [ black parso pytestCheckHook pytest-cov pytest-xdist ]; + checkInputs = [ parso pytestCheckHook pytest-xdist ]; pytestFlagsArray = [ "-v" - "--numprocesses $NIX_BUILD_CORES" + ]; + + disabledTests = [ + # https://github.com/Zac-HD/hypothesmith/issues/21 + "test_source_code_from_libcst_node_type" ]; pythonImportsCheck = [ "hypothesmith" ]; |