2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-03-12 07:09:13 +00:00
|
|
|
, async_generator
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-03-12 07:09:13 +00:00
|
|
|
, doCheck ? true
|
|
|
|
, fetchFromGitHub
|
|
|
|
, httpx
|
2020-04-24 23:36:52 +00:00
|
|
|
, pytest
|
2021-03-12 07:09:13 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, sanic
|
|
|
|
, websockets
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pytest-sanic";
|
2021-03-12 07:09:13 +00:00
|
|
|
version = "1.7.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "yunstanford";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1zpgnw1lqbll59chv4hgcn31mdql1nv4gw9crbihky3ly3d3ncqi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
async_generator
|
2021-03-12 07:09:13 +00:00
|
|
|
httpx
|
|
|
|
pytest
|
|
|
|
websockets
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-03-12 07:09:13 +00:00
|
|
|
checkInputs = [
|
|
|
|
sanic
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
inherit doCheck;
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pytest_sanic" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A pytest plugin for Sanic";
|
|
|
|
homepage = "https://github.com/yunstanford/pytest-sanic/";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|