2020-08-02 20:12:13 +01:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
|
2020-08-17 01:31:08 +01:00
|
|
|
, trio, python, async_generator, hypothesis, outcome, pytest }:
|
2020-08-02 20:12:13 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-trio";
|
2020-10-18 15:17:32 +01:00
|
|
|
version = "0.7.0";
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-08-02 20:12:13 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "python-trio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-10-18 15:17:32 +01:00
|
|
|
sha256 = "0bhh2nknhp14jzsx4zzpqm4qnfaihyi65cjf6kf6qgdhc0ax6nf4";
|
2020-08-02 20:12:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
trio
|
|
|
|
async_generator
|
|
|
|
outcome
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
hypothesis
|
|
|
|
];
|
|
|
|
|
2020-08-17 01:31:08 +01:00
|
|
|
# broken with pytest 5 and 6
|
|
|
|
doCheck = false;
|
2020-08-02 20:12:13 +01:00
|
|
|
checkPhase = ''
|
2020-08-17 01:31:08 +01:00
|
|
|
rm pytest.ini
|
|
|
|
PYTHONPATH=$PWD:$PYTHONPATH pytest
|
2020-08-02 20:12:13 +01:00
|
|
|
'';
|
|
|
|
|
2020-08-17 01:31:08 +01:00
|
|
|
pythonImportsCheck = [ "pytest_trio" ];
|
|
|
|
|
2020-08-02 20:12:13 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Pytest plugin for trio";
|
|
|
|
homepage = "https://github.com/python-trio/pytest-trio";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ hexa ];
|
|
|
|
};
|
|
|
|
}
|