2022-11-02 22:02:43 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-09-25 04:45:31 +00:00
|
|
|
, hypothesis
|
|
|
|
, poetry
|
|
|
|
, pydantic
|
|
|
|
, pytest
|
2022-11-02 22:02:43 +00:00
|
|
|
, pythonOlder
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "hypothesis-auto";
|
|
|
|
version = "1.1.4";
|
|
|
|
format = "pyproject";
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-11-02 22:02:43 +00:00
|
|
|
hash = "sha256-XiwvsJ3AmEJRLYBjC7eSNZodM9LARzrUfuI9oL6eMrE=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
postPatch = ''
|
|
|
|
# https://github.com/timothycrosley/hypothesis-auto/pull/20
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'pydantic = ">=0.32.2<2.0.0"' 'pydantic = ">=0.32.2, <2.0.0"' \
|
|
|
|
--replace 'hypothesis = ">=4.36<6.0.0"' 'hypothesis = "*"'
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pydantic
|
|
|
|
hypothesis
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
2022-11-02 22:02:43 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"hypothesis_auto"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Enables fully automatic tests for type annotated functions";
|
|
|
|
homepage = "https://github.com/timothycrosley/hypothesis-auto/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jonringer ];
|
|
|
|
};
|
|
|
|
}
|