diff --git a/pkgs/development/python-modules/google-cloud-automl/default.nix b/pkgs/development/python-modules/google-cloud-automl/default.nix index 0bab9ce64870..899eef02c9a1 100644 --- a/pkgs/development/python-modules/google-cloud-automl/default.nix +++ b/pkgs/development/python-modules/google-cloud-automl/default.nix @@ -21,7 +21,11 @@ buildPythonPackage rec { sha256 = "sha256-UjYzSWtP4cp0p7Is2qIGWBgEhjgTv0YeL0N9D7etIbY="; }; - propagatedBuildInputs = [ google-api-core libcst proto-plus ]; + propagatedBuildInputs = [ + google-api-core + libcst + proto-plus + ]; checkInputs = [ google-cloud-storage @@ -35,10 +39,13 @@ buildPythonPackage rec { preCheck = '' # do not shadow imports 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 = [ # requires credentials "test_prediction_client_client_info" diff --git a/pkgs/development/python-modules/google-cloud-datastore/default.nix b/pkgs/development/python-modules/google-cloud-datastore/default.nix index 79a97b692896..dae19022d06c 100644 --- a/pkgs/development/python-modules/google-cloud-datastore/default.nix +++ b/pkgs/development/python-modules/google-cloud-datastore/default.nix @@ -20,17 +20,30 @@ buildPythonPackage rec { 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 = '' # directory shadows imports rm -r google - # requires credentials - rm tests/system/test_system.py ''; + disabledTestPaths = [ + # Requires credentials + "tests/system/test_system.py" + ]; + pythonImportsCheck = [ "google.cloud.datastore" "google.cloud.datastore_admin_v1" diff --git a/pkgs/development/python-modules/google-cloud-error-reporting/default.nix b/pkgs/development/python-modules/google-cloud-error-reporting/default.nix index 732c9aac81d8..8aae0c072a0f 100644 --- a/pkgs/development/python-modules/google-cloud-error-reporting/default.nix +++ b/pkgs/development/python-modules/google-cloud-error-reporting/default.nix @@ -24,9 +24,18 @@ buildPythonPackage rec { --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 = [ # require credentials @@ -34,8 +43,8 @@ buildPythonPackage rec { "test_report_exception" ]; - # prevent google directory from shadowing google imports preCheck = '' + # prevent google directory from shadowing google imports rm -r google ''; diff --git a/pkgs/development/python-modules/google-cloud-firestore/default.nix b/pkgs/development/python-modules/google-cloud-firestore/default.nix index 92922fcc403f..4ff4c920c8ad 100644 --- a/pkgs/development/python-modules/google-cloud-firestore/default.nix +++ b/pkgs/development/python-modules/google-cloud-firestore/default.nix @@ -39,10 +39,10 @@ buildPythonPackage rec { rm -r google ''; - pytestFlagsArray = [ - # tests are broken - "--ignore=tests/system/test_system.py" - "--ignore=tests/system/test_system_async.py" + disabledTestPaths = [ + # Tests are broken + "tests/system/test_system.py" + "tests/system/test_system_async.py" ]; disabledTests = [ diff --git a/pkgs/development/python-modules/google-cloud-pubsub/default.nix b/pkgs/development/python-modules/google-cloud-pubsub/default.nix index 27eee2507a74..6bce8cc5a89b 100644 --- a/pkgs/development/python-modules/google-cloud-pubsub/default.nix +++ b/pkgs/development/python-modules/google-cloud-pubsub/default.nix @@ -20,17 +20,30 @@ buildPythonPackage rec { 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 = '' # prevent google directory from shadowing google imports 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" ]; meta = with lib; { diff --git a/pkgs/development/python-modules/google-cloud-spanner/default.nix b/pkgs/development/python-modules/google-cloud-spanner/default.nix index e1f059810296..eae38f5dfc17 100644 --- a/pkgs/development/python-modules/google-cloud-spanner/default.nix +++ b/pkgs/development/python-modules/google-cloud-spanner/default.nix @@ -21,18 +21,35 @@ buildPythonPackage rec { 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 = '' # prevent google directory from shadowing google imports 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 = [ "google.cloud.spanner_admin_database_v1" "google.cloud.spanner_admin_instance_v1" diff --git a/pkgs/development/python-modules/google-cloud-translate/default.nix b/pkgs/development/python-modules/google-cloud-translate/default.nix index beae78331abd..b1167433b4c0 100644 --- a/pkgs/development/python-modules/google-cloud-translate/default.nix +++ b/pkgs/development/python-modules/google-cloud-translate/default.nix @@ -21,9 +21,19 @@ buildPythonPackage rec { 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 = '' # prevent shadowing imports