1{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
2, trio, async_generator, hypothesis, outcome, pytest }:
3
4buildPythonPackage rec {
5 pname = "pytest-trio";
6 version = "0.7.0";
7 disabled = pythonOlder "3.6";
8
9 src = fetchFromGitHub {
10 owner = "python-trio";
11 repo = pname;
12 rev = "v${version}";
13 sha256 = "0bhh2nknhp14jzsx4zzpqm4qnfaihyi65cjf6kf6qgdhc0ax6nf4";
14 };
15
16 buildInputs = [ pytest ];
17
18 propagatedBuildInputs = [
19 trio
20 async_generator
21 outcome
22 ];
23
24 nativeCheckInputs = [
25 pytest
26 hypothesis
27 ];
28
29 # broken with pytest 5 and 6
30 doCheck = false;
31 checkPhase = ''
32 rm pytest.ini
33 PYTHONPATH=$PWD:$PYTHONPATH pytest
34 '';
35
36 pythonImportsCheck = [ "pytest_trio" ];
37
38 meta = with lib; {
39 description = "Pytest plugin for trio";
40 homepage = "https://github.com/python-trio/pytest-trio";
41 license = licenses.asl20;
42 maintainers = with maintainers; [ hexa ];
43 };
44}