-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
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.
Description
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.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.