6f0c856b91
Since pytest-asyncio==0.19.0 the strict mode has become the default. The respx module has not been upgraded with that in mind, so let's rollback that change to fix the tests.
58 lines
939 B
Nix
58 lines
939 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, httpcore
|
|
, httpx
|
|
, flask
|
|
, pytest-asyncio
|
|
, pytestCheckHook
|
|
, starlette
|
|
, trio
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "respx";
|
|
version = "0.19.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "lundberg";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-uNmSBJOQF4baq8AWzfwj0kinO19jr6Mp9Yblys/WmZs=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
httpx
|
|
];
|
|
|
|
checkInputs = [
|
|
httpcore
|
|
httpx
|
|
flask
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
starlette
|
|
trio
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
"--asyncio-mode=legacy"
|
|
];
|
|
|
|
postPatch = ''
|
|
sed -i "/--cov/d" setup.cfg
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|