2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
callPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
httpx,
|
|
|
|
pythonOlder,
|
|
|
|
sanic,
|
|
|
|
websockets,
|
2021-05-03 20:48:10 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sanic-testing";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "23.12.0";
|
2022-12-02 08:20:57 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sanic-org";
|
|
|
|
repo = "sanic-testing";
|
2022-07-14 12:49:19 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-pFsGB0QDeO/iliHOitHqBIQtDlwRgFg8nhgMLsopoec=";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"testsout"
|
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
httpx
|
|
|
|
sanic
|
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir $testsout
|
|
|
|
cp -R tests $testsout/tests
|
|
|
|
'';
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2022-12-02 08:20:57 +00:00
|
|
|
# Check in passthru.tests.pytest to escape infinite recursion with sanic
|
2022-04-15 01:41:22 +00:00
|
|
|
doCheck = false;
|
2022-12-02 08:20:57 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
doInstallCheck = false;
|
2021-05-03 20:48:10 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
passthru.tests = {
|
|
|
|
pytest = callPackage ./tests.nix { };
|
|
|
|
};
|
2021-05-03 20:48:10 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Core testing clients for the Sanic web framework";
|
|
|
|
homepage = "https://github.com/sanic-org/sanic-testing";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/sanic-org/sanic-testing/releases/tag/v${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ AluisioASG ];
|
|
|
|
};
|
|
|
|
}
|