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