depot/third_party/nixpkgs/pkgs/development/python-modules/respx/default.nix
Default email d419639f9c Project import generated by Copybara.
GitOrigin-RevId: 6b1057b452c55bb3b463f0d7055bc4ec3fd1f381
2021-02-17 18:02:09 +01:00

48 lines
944 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, httpcore
, httpx
, pytest-asyncio
, pytest-cov
, pytestCheckHook
, trio
}:
buildPythonPackage rec {
pname = "respx";
version = "0.16.3";
src = fetchFromGitHub {
owner = "lundberg";
repo = pname;
rev = version;
sha256 = "0if9sg83rznl37hsjw6pfk78jpxi421g9p21wd92jcd6073g4nbd";
};
# Coverage is under 100 % due to the excluded tests
postPatch = ''
substituteInPlace setup.cfg --replace "--cov-fail-under 100" ""
'';
propagatedBuildInputs = [ httpx ];
checkInputs = [
httpcore
httpx
pytest-asyncio
pytest-cov
pytestCheckHook
trio
];
disabledTests = [ "test_pass_through" ];
pythonImportsCheck = [ "respx" ];
meta = with lib; {
description = "Python library for mocking HTTPX";
homepage = "https://lundberg.github.io/respx/";
license = with licenses; [ bsd3 ];
maintainers = with maintainers; [ fab ];
};
}