Merge pull request #109615 from urbas/python-hug-test-failures
This commit is contained in:
commit
52a24dcf78
@ -1,8 +1,7 @@
|
||||
{ lib , buildPythonPackage, fetchFromGitHub, isPy27
|
||||
, falcon
|
||||
, pytestrunner
|
||||
, requests
|
||||
, pytest
|
||||
, pytestCheckHook
|
||||
, marshmallow
|
||||
, mock
|
||||
, numpy
|
||||
@ -20,19 +19,33 @@ buildPythonPackage rec {
|
||||
sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pytestrunner ];
|
||||
propagatedBuildInputs = [ falcon requests ];
|
||||
|
||||
checkInputs = [ mock marshmallow pytest numpy ];
|
||||
checkPhase = ''
|
||||
mv hug hug.hidden
|
||||
# some tests attempt network access
|
||||
PATH=$out/bin:$PATH pytest -k "not (test_request or test_datagram_request)"
|
||||
checkInputs = [ mock marshmallow pytestCheckHook numpy ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py --replace '"pytest-runner"' ""
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# some tests need the `hug` CLI on the PATH
|
||||
export PATH=$out/bin:$PATH
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# some tests attempt network access
|
||||
"test_datagram_request"
|
||||
"test_request"
|
||||
# these tests use an unstable test dependency (https://github.com/hugapi/hug/issues/859)
|
||||
"test_marshmallow_custom_context"
|
||||
"test_marshmallow_schema"
|
||||
"test_transform"
|
||||
"test_validate_route_args_negative_case"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
|
||||
homepage = "https://github.com/timothycrosley/hug";
|
||||
homepage = "https://github.com/hugapi/hug";
|
||||
license = licenses.mit;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user