Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

'TestClient.test_ctor_wo_project' fails with `google-cloud-core 1.6.0' #427

Copy link
Copy link

Description

@tseaver
Issue body actions

googleapis/python-cloud-core#51 changed the semantics of default project detection.

$ nox -re unit-3.9
...

=================================== FAILURES ===================================
_______________________ TestClient.test_ctor_wo_project ________________________

self = <tests.unit.test_client.TestClient testMethod=test_ctor_wo_project>

    def test_ctor_wo_project(self):
        from google.cloud.storage._http import Connection
    
        PROJECT = "PROJECT"
        credentials = _make_credentials()
    
        ddp_patch = mock.patch(
            "google.cloud.client._determine_default_project", return_value=PROJECT
        )
    
        with ddp_patch:
            client = self._make_one(credentials=credentials)
    
>       self.assertEqual(client.project, PROJECT)
E       AssertionError: 'precise-truck-742' != 'PROJECT'
E       - precise-truck-742
E       + PROJECT

tests/unit/test_client.py:186: AssertionError
...
$ .nox/unit-3-9/bin/pip show google-cloud-core | grep Version
Version: 1.6.0
$ .nox/unit-3-9/bin/pip install --upgrade "google-cloud-core==1.5.0"
...
Installing collected packages: google-cloud-core
  Attempting uninstall: google-cloud-core
    Found existing installation: google-cloud-core 1.6.0
    Uninstalling google-cloud-core-1.6.0:
      Successfully uninstalled google-cloud-core-1.6.0
Successfully installed google-cloud-core-1.5.0
$ nox -re unit-3.9
nox > Running session unit-3.9
nox > Re-using existing virtual environment at .nox/unit-3-9.
nox > python -m pip install mock pytest pytest-cov
nox > python -m pip install -e .
nox > py.test --quiet --cov=google.cloud.storage --cov=google.cloud --cov=tests.unit --cov-append --cov-config=.coveragerc --cov-report= --cov-fail-under=0 tests/unit
.......................................s................................ [  7%]
........................................................................ [ 15%]
........................................................................ [ 23%]
........................................................................ [ 31%]
........................................................................ [ 39%]
........................................................................ [ 46%]
........................................................................ [ 54%]
........................................................................ [ 62%]
........................................................................ [ 70%]
........................................................................ [ 78%]
........................................................................ [ 85%]
........................................................................ [ 93%]
.........................................................                [100%]
Coverage.py warning: Module google.cloud was previously imported, but not measured (module-not-measured)



920 passed, 1 skipped in 13.93s
nox > Session unit-3.9 was successful.
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.type: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.