nixpkgs/pkgs/development/python-modules/hypothesis/default.nix
2022-06-06 11:46:08 -07:00

63 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonAtLeast
, fetchFromGitHub
, attrs
, pexpect
, doCheck ? true
, pytestCheckHook
, pytest-xdist
, sortedcontainers
, pythonOlder
}:
buildPythonPackage rec {
pname = "hypothesis";
version = "6.46.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "HypothesisWorks";
repo = "hypothesis";
rev = "hypothesis-python-${version}";
hash = "sha256-eQ7Ns0k1hOVw8/xiINMei6GbQqDHXrBl+1v8YQeFO9Q=";
};
postUnpack = "sourceRoot=$sourceRoot/hypothesis-python";
propagatedBuildInputs = [
attrs
sortedcontainers
];
checkInputs = [
pexpect
pytest-xdist
pytestCheckHook
];
inherit doCheck;
# This file changes how pytest runs and breaks it
preCheck = ''
rm tox.ini
'';
pytestFlagsArray = [
"tests/cover"
];
pythonImportsCheck = [
"hypothesis"
];
meta = with lib; {
description = "Library for property based testing";
homepage = "https://github.com/HypothesisWorks/hypothesis";
license = licenses.mpl20;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}