pythonPackages.hug: enable tests
This commit is contained in:
parent
dd57bf928b
commit
d7cad2b8f9
|
@ -1,7 +1,11 @@
|
||||||
{ lib , buildPythonPackage, fetchPypi, isPy27
|
{ lib , buildPythonPackage, fetchFromGitHub, isPy27
|
||||||
, falcon
|
, falcon
|
||||||
, pytestrunner
|
, pytestrunner
|
||||||
, requests
|
, requests
|
||||||
|
, pytest
|
||||||
|
, marshmallow
|
||||||
|
, mock
|
||||||
|
, numpy
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -9,16 +13,22 @@ buildPythonPackage rec {
|
||||||
version = "2.6.0";
|
version = "2.6.0";
|
||||||
disabled = isPy27;
|
disabled = isPy27;
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "hugapi";
|
||||||
sha256 = "0iamrzjy8z1xibynkgfl6cn2sbm66awxbp75b26pi32fc41d0k50";
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
sha256 = "05rsv16g7ph100p8kl4l2jba0y4wcpp3xblc02mfp67zp1279vaq";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pytestrunner ];
|
nativeBuildInputs = [ pytestrunner ];
|
||||||
propagatedBuildInputs = [ falcon requests ];
|
propagatedBuildInputs = [ falcon requests ];
|
||||||
|
|
||||||
# tests are not shipped in the tarball
|
checkInputs = [ mock marshmallow pytest numpy ];
|
||||||
doCheck = false;
|
checkPhase = ''
|
||||||
|
mv hug hug.hidden
|
||||||
|
# some tests attempt network access
|
||||||
|
PATH=$out/bin:$PATH pytest -k "not (test_request or test_datagram_request)"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
|
description = "A Python framework that makes developing APIs as simple as possible, but no simpler";
|
||||||
|
|
Loading…
Reference in New Issue