python3Packages.google_cloud_translate: fix tests
This commit is contained in:
parent
9a902f2a71
commit
3a0da735d9
@ -1,12 +1,6 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, google_api_core
|
||||
, google_cloud_core
|
||||
, grpcio
|
||||
, pytest
|
||||
, mock
|
||||
}:
|
||||
{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
|
||||
, google_api_core, google_cloud_core, google_cloud_testutils, grpcio, libcst
|
||||
, mock, proto-plus, pytest-asyncio }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "google-cloud-translate";
|
||||
@ -17,18 +11,29 @@ buildPythonPackage rec {
|
||||
sha256 = "ecdea3e176e80f606d08c4c7fd5acea6b3dd960f4b2e9a65951aaf800350a759";
|
||||
};
|
||||
|
||||
# google_cloud_core[grpc] -> grpcio
|
||||
propagatedBuildInputs = [ google_api_core google_cloud_core grpcio ];
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
checkInputs = [ pytest mock ];
|
||||
checkPhase = ''
|
||||
cd tests # prevent local google/__init__.py from getting loaded
|
||||
pytest unit -k 'not extra_headers'
|
||||
# google_cloud_core[grpc] -> grpcio
|
||||
propagatedBuildInputs =
|
||||
[ google_api_core google_cloud_core grpcio libcst proto-plus ];
|
||||
|
||||
checkInputs = [ google_cloud_testutils mock pytest-asyncio pytestCheckHook ];
|
||||
|
||||
# test_http.py broken, fix not yet released
|
||||
# https://github.com/googleapis/python-translate/pull/69
|
||||
disabledTests = [
|
||||
"test_build_api_url_w_extra_query_params"
|
||||
"test_build_api_url_no_extra_query_params"
|
||||
"test_build_api_url_w_custom_endpoint"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
rm -r google
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Google Cloud Translation API client library";
|
||||
homepage = "https://github.com/GoogleCloudPlatform/google-cloud-python";
|
||||
homepage = "https://github.com/googleapis/python-translate";
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.costrouc ];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user