2019-05-07 13:53:44 +01:00
|
|
|
{ lib
|
2021-03-12 22:20:19 +00:00
|
|
|
, aiohttp
|
2021-03-07 21:11:56 +00:00
|
|
|
, async_generator
|
2019-05-07 13:53:44 +01:00
|
|
|
, buildPythonPackage
|
2021-03-07 21:11:56 +00:00
|
|
|
, doCheck ? true
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
2019-05-07 13:53:44 +01:00
|
|
|
, pytest
|
2021-03-07 21:11:56 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, sanic
|
|
|
|
, websockets
|
2019-05-07 13:53:44 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-sanic";
|
2021-03-07 21:11:56 +00:00
|
|
|
version = "1.7.0";
|
2019-05-07 13:53:44 +01:00
|
|
|
|
2021-03-07 21:11:56 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yunstanford";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1zpgnw1lqbll59chv4hgcn31mdql1nv4gw9crbihky3ly3d3ncqi";
|
2019-05-07 13:53:44 +01:00
|
|
|
};
|
|
|
|
|
2021-03-12 22:20:19 +00:00
|
|
|
buildInputs = [ pytest ];
|
|
|
|
|
2019-05-07 13:53:44 +01:00
|
|
|
propagatedBuildInputs = [
|
2021-03-12 22:20:19 +00:00
|
|
|
aiohttp
|
2019-05-07 13:53:44 +01:00
|
|
|
async_generator
|
2021-03-07 21:11:56 +00:00
|
|
|
httpx
|
|
|
|
pytest
|
|
|
|
websockets
|
2019-05-07 13:53:44 +01:00
|
|
|
];
|
|
|
|
|
2021-03-07 21:11:56 +00:00
|
|
|
checkInputs = [
|
|
|
|
sanic
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
inherit doCheck;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pytest_sanic" ];
|
2019-05-07 13:53:44 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A pytest plugin for Sanic";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/yunstanford/pytest-sanic/";
|
2019-05-07 13:53:44 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|