2020-08-20 17:08:02 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2023-08-10 07:59:29 +00:00
|
|
|
, trio, async-generator, hypothesis, outcome, pytest }:
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-trio";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.8.0";
|
2020-12-25 13:55:36 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-08-20 17:08:02 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-trio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-gUH35Yk/pBD2EdCEt8D0XQKWU8BwmX5xtAW10qRhoYk=";
|
2020-08-20 17:08:02 +00:00
|
|
|
};
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
trio
|
2023-08-10 07:59:29 +00:00
|
|
|
async-generator
|
2020-08-20 17:08:02 +00:00
|
|
|
outcome
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-08-20 17:08:02 +00:00
|
|
|
pytest
|
|
|
|
hypothesis
|
|
|
|
];
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
# broken with pytest 5 and 6
|
|
|
|
doCheck = false;
|
2020-08-20 17:08:02 +00:00
|
|
|
checkPhase = ''
|
2020-09-25 04:45:31 +00:00
|
|
|
rm pytest.ini
|
|
|
|
PYTHONPATH=$PWD:$PYTHONPATH pytest
|
2020-08-20 17:08:02 +00:00
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
pythonImportsCheck = [ "pytest_trio" ];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Pytest plugin for trio";
|
|
|
|
homepage = "https://github.com/python-trio/pytest-trio";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|