python3Packages.google_cloud_runtimeconfig: fix tests

This commit is contained in:
Austin Butler 2020-11-02 17:17:29 -08:00 committed by Jonathan Ringer
parent 7fbefa7cf9
commit d6e7e3c6f8

View file

@ -1,11 +1,5 @@
{ stdenv { stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
, buildPythonPackage , google_api_core, google_cloud_core, mock }:
, fetchPypi
, google_api_core
, google_cloud_core
, pytest
, mock
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "google-cloud-runtimeconfig"; pname = "google-cloud-runtimeconfig";
@ -16,18 +10,24 @@ buildPythonPackage rec {
sha256 = "3d125c01817d5bef2b644095b044d22b03b9d8d4591088cadd8e97851f7a150a"; sha256 = "3d125c01817d5bef2b644095b044d22b03b9d8d4591088cadd8e97851f7a150a";
}; };
checkInputs = [ pytest mock ]; disabled = pythonOlder "3.5";
checkInputs = [ mock pytestCheckHook ];
propagatedBuildInputs = [ google_api_core google_cloud_core ]; propagatedBuildInputs = [ google_api_core google_cloud_core ];
# ignore tests which require credentials or network # api_url test broken, fix not yet released
checkPhase = '' # https://github.com/googleapis/python-resource-manager/pull/31
# Client tests require credentials
disabledTests = [ "build_api_url_w_custom_endpoint" "client_options" ];
# prevent google directory from shadowing google imports
preCheck = ''
rm -r google rm -r google
pytest tests/unit -k 'not client and not extra_headers'
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Google Cloud RuntimeConfig API client library"; description = "Google Cloud RuntimeConfig API client library";
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python"; homepage = "https://pypi.org/project/google-cloud-runtimeconfig";
license = licenses.asl20; license = licenses.asl20;
maintainers = [ maintainers.costrouc ]; maintainers = [ maintainers.costrouc ];
}; };