depot/third_party/nixpkgs/pkgs/development/python-modules/sanic-testing/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

57 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, callPackage
, fetchFromGitHub
, httpx
, pythonOlder
, sanic
, websockets
}:
buildPythonPackage rec {
pname = "sanic-testing";
version = "23.6.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "sanic-org";
repo = "sanic-testing";
rev = "refs/tags/v${version}";
hash = "sha256-WDiEuve9P9fLHxpK0UjxhbZUmWXtP+DV7e6OT19TASs=";
};
outputs = [
"out"
"testsout"
];
propagatedBuildInputs = [
httpx
sanic
websockets
];
postInstall = ''
mkdir $testsout
cp -R tests $testsout/tests
'';
# Check in passthru.tests.pytest to escape infinite recursion with sanic
doCheck = false;
doInstallCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
};
meta = with lib; {
description = "Core testing clients for the Sanic web framework";
homepage = "https://github.com/sanic-org/sanic-testing";
changelog = "https://github.com/sanic-org/sanic-testing/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ AluisioASG ];
};
}