python3Packages.google-cloud-*: migrate to disabledTestPaths

This commit is contained in:
Fabian Affolter 2021-06-21 09:09:46 +02:00
parent 3838df3ec8
commit 926450c6e3
7 changed files with 94 additions and 25 deletions

View File

@ -21,7 +21,11 @@ buildPythonPackage rec {
sha256 = "sha256-UjYzSWtP4cp0p7Is2qIGWBgEhjgTv0YeL0N9D7etIbY="; sha256 = "sha256-UjYzSWtP4cp0p7Is2qIGWBgEhjgTv0YeL0N9D7etIbY=";
}; };
propagatedBuildInputs = [ google-api-core libcst proto-plus ]; propagatedBuildInputs = [
google-api-core
libcst
proto-plus
];
checkInputs = [ checkInputs = [
google-cloud-storage google-cloud-storage
@ -35,10 +39,13 @@ buildPythonPackage rec {
preCheck = '' preCheck = ''
# do not shadow imports # do not shadow imports
rm -r google rm -r google
# requires credentials
rm tests/system/gapic/v1beta1/test_system_tables_client_v1.py
''; '';
disabledTestPaths = [
# requires credentials
"tests/system/gapic/v1beta1/test_system_tables_client_v1.py"
];
disabledTests = [ disabledTests = [
# requires credentials # requires credentials
"test_prediction_client_client_info" "test_prediction_client_client_info"

View File

@ -20,17 +20,30 @@ buildPythonPackage rec {
sha256 = "sha256-56UQdZudVf9jyYPjxCy/XDX5tzEPTWEevjaX2mV2vLQ="; sha256 = "sha256-56UQdZudVf9jyYPjxCy/XDX5tzEPTWEevjaX2mV2vLQ=";
}; };
propagatedBuildInputs = [ google-api-core google-cloud-core libcst proto-plus ]; propagatedBuildInputs = [
google-api-core
google-cloud-core
libcst
proto-plus
];
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ]; checkInputs = [
google-cloud-testutils
mock
pytestCheckHook
pytest-asyncio
];
preCheck = '' preCheck = ''
# directory shadows imports # directory shadows imports
rm -r google rm -r google
# requires credentials
rm tests/system/test_system.py
''; '';
disabledTestPaths = [
# Requires credentials
"tests/system/test_system.py"
];
pythonImportsCheck = [ pythonImportsCheck = [
"google.cloud.datastore" "google.cloud.datastore"
"google.cloud.datastore_admin_v1" "google.cloud.datastore_admin_v1"

View File

@ -24,9 +24,18 @@ buildPythonPackage rec {
--replace 'google-cloud-logging>=1.14.0, <2.4' 'google-cloud-logging>=1.14.0' --replace 'google-cloud-logging>=1.14.0, <2.4' 'google-cloud-logging>=1.14.0'
''; '';
propagatedBuildInputs = [ google-cloud-logging libcst proto-plus ]; propagatedBuildInputs = [
google-cloud-logging
libcst
proto-plus
];
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ]; checkInputs = [
google-cloud-testutils
mock
pytestCheckHook
pytest-asyncio
];
disabledTests = [ disabledTests = [
# require credentials # require credentials
@ -34,8 +43,8 @@ buildPythonPackage rec {
"test_report_exception" "test_report_exception"
]; ];
# prevent google directory from shadowing google imports
preCheck = '' preCheck = ''
# prevent google directory from shadowing google imports
rm -r google rm -r google
''; '';

View File

@ -39,10 +39,10 @@ buildPythonPackage rec {
rm -r google rm -r google
''; '';
pytestFlagsArray = [ disabledTestPaths = [
# tests are broken # Tests are broken
"--ignore=tests/system/test_system.py" "tests/system/test_system.py"
"--ignore=tests/system/test_system_async.py" "tests/system/test_system_async.py"
]; ];
disabledTests = [ disabledTests = [

View File

@ -20,17 +20,30 @@ buildPythonPackage rec {
sha256 = "sha256-hwZVe3FTLHauxIQJ3KwYnKrEfPLey4hQrnVpS/cDJrI="; sha256 = "sha256-hwZVe3FTLHauxIQJ3KwYnKrEfPLey4hQrnVpS/cDJrI=";
}; };
propagatedBuildInputs = [ grpc_google_iam_v1 google-api-core libcst proto-plus ]; propagatedBuildInputs = [
grpc_google_iam_v1
google-api-core
libcst
proto-plus
];
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ]; checkInputs = [
google-cloud-testutils
mock
pytestCheckHook
pytest-asyncio
];
preCheck = '' preCheck = ''
# prevent google directory from shadowing google imports # prevent google directory from shadowing google imports
rm -r google rm -r google
# Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
rm -r tests/unit/pubsub_v1
''; '';
disabledTestPaths = [
# Tests in pubsub_v1 attempt to contact pubsub.googleapis.com
"tests/unit/pubsub_v1"
];
pythonImportsCheck = [ "google.cloud.pubsub" ]; pythonImportsCheck = [ "google.cloud.pubsub" ];
meta = with lib; { meta = with lib; {

View File

@ -21,18 +21,35 @@ buildPythonPackage rec {
sha256 = "sha256-8o7pr9msuMfIN7UMX+/gppmD3MWXt2hBqb7vcLUE22M="; sha256 = "sha256-8o7pr9msuMfIN7UMX+/gppmD3MWXt2hBqb7vcLUE22M=";
}; };
propagatedBuildInputs = [ google-cloud-core grpc_google_iam_v1 libcst proto-plus sqlparse ]; propagatedBuildInputs = [
google-cloud-core
grpc_google_iam_v1
libcst
proto-plus
sqlparse
];
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ]; checkInputs = [
google-cloud-testutils
mock
pytestCheckHook
pytest-asyncio
];
preCheck = '' preCheck = ''
# prevent google directory from shadowing google imports # prevent google directory from shadowing google imports
rm -r google rm -r google
# disable tests which require credentials
rm tests/system/test_{system,system_dbapi}.py
rm tests/unit/spanner_dbapi/test_{connect,connection,cursor}.py
''; '';
disabledTestPaths = [
# Requires credentials
"tests/system/test_system.py"
"tests/system/test_system_dbapi.py"
"tests/unit/spanner_dbapi/test_connect.py"
"tests/unit/spanner_dbapi/test_connection.py"
"tests/unit/spanner_dbapi/test_cursor.py"
];
pythonImportsCheck = [ pythonImportsCheck = [
"google.cloud.spanner_admin_database_v1" "google.cloud.spanner_admin_database_v1"
"google.cloud.spanner_admin_instance_v1" "google.cloud.spanner_admin_instance_v1"

View File

@ -21,9 +21,19 @@ buildPythonPackage rec {
sha256 = "sha256-jNlX9LKajHqYPgpCfCcSUzxBu3AHt2qMyI1sZQdcZ5o="; sha256 = "sha256-jNlX9LKajHqYPgpCfCcSUzxBu3AHt2qMyI1sZQdcZ5o=";
}; };
propagatedBuildInputs = [ google-api-core google-cloud-core libcst proto-plus ]; propagatedBuildInputs = [
google-api-core
google-cloud-core
libcst
proto-plus
];
checkInputs = [ google-cloud-testutils mock pytestCheckHook pytest-asyncio ]; checkInputs = [
google-cloud-testutils
mock
pytestCheckHook
pytest-asyncio
];
preCheck = '' preCheck = ''
# prevent shadowing imports # prevent shadowing imports