mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-04 21:03:15 +00:00
python3Packages.google_cloud_storage: fix tests
This commit is contained in:
parent
d0b54015df
commit
d19278d5ee
@ -1,13 +1,7 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, google_resumable_media
|
||||
, google_api_core
|
||||
, google_cloud_core
|
||||
, pytest
|
||||
, mock
|
||||
, setuptools
|
||||
}:
|
||||
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
|
||||
, google_api_core, google_auth, google-cloud-iam, google_cloud_core
|
||||
, google_cloud_kms, google_cloud_testutils, google_resumable_media, mock
|
||||
, requests }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-cloud-storage";
|
||||
@ -18,27 +12,36 @@ buildPythonPackage rec {
|
||||
sha256 = "da12b7bd79bbe978a7945a44b600604fbc10ece2935d31f243e751f99135e34f";
|
||||
};
|
||||
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
google_api_core
|
||||
google_auth
|
||||
google_cloud_core
|
||||
google_resumable_media
|
||||
setuptools
|
||||
requests
|
||||
];
|
||||
checkInputs = [
|
||||
google-cloud-iam
|
||||
google_cloud_kms
|
||||
google_cloud_testutils
|
||||
mock
|
||||
pytest
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# remove directory from interferring with importing modules
|
||||
# ignore tests which require credentials
|
||||
checkPhase = ''
|
||||
# disable tests which require credentials
|
||||
disabledTests = [ "create" "get" "post" "test_build_api_url" ];
|
||||
|
||||
# prevent google directory from shadowing google imports
|
||||
# remove tests which require credentials
|
||||
preCheck = ''
|
||||
rm -r google
|
||||
pytest tests/unit -k 'not (create or get or post)'
|
||||
rm tests/system/test_system.py tests/unit/test_client.py
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Google Cloud Storage API client library";
|
||||
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
|
||||
homepage = "https://github.com/googleapis/python-storage";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ costrouc ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user