python3Packages.google_cloud_translate: fix tests
This commit is contained in:
parent
9a902f2a71
commit
3a0da735d9
@ -1,12 +1,6 @@
|
|||||||
{ stdenv
|
{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
|
||||||
, buildPythonPackage
|
, google_api_core, google_cloud_core, google_cloud_testutils, grpcio, libcst
|
||||||
, fetchPypi
|
, mock, proto-plus, pytest-asyncio }:
|
||||||
, google_api_core
|
|
||||||
, google_cloud_core
|
|
||||||
, grpcio
|
|
||||||
, pytest
|
|
||||||
, mock
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "google-cloud-translate";
|
pname = "google-cloud-translate";
|
||||||
@ -17,18 +11,29 @@ buildPythonPackage rec {
|
|||||||
sha256 = "ecdea3e176e80f606d08c4c7fd5acea6b3dd960f4b2e9a65951aaf800350a759";
|
sha256 = "ecdea3e176e80f606d08c4c7fd5acea6b3dd960f4b2e9a65951aaf800350a759";
|
||||||
};
|
};
|
||||||
|
|
||||||
# google_cloud_core[grpc] -> grpcio
|
disabled = pythonOlder "3.6";
|
||||||
propagatedBuildInputs = [ google_api_core google_cloud_core grpcio ];
|
|
||||||
|
|
||||||
checkInputs = [ pytest mock ];
|
# google_cloud_core[grpc] -> grpcio
|
||||||
checkPhase = ''
|
propagatedBuildInputs =
|
||||||
cd tests # prevent local google/__init__.py from getting loaded
|
[ google_api_core google_cloud_core grpcio libcst proto-plus ];
|
||||||
pytest unit -k 'not extra_headers'
|
|
||||||
|
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; {
|
meta = with stdenv.lib; {
|
||||||
description = "Google Cloud Translation API client library";
|
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;
|
license = licenses.asl20;
|
||||||
maintainers = [ maintainers.costrouc ];
|
maintainers = [ maintainers.costrouc ];
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user