Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests emit deprecation warnings #498

Closed
tseaver opened this issue Jul 9, 2021 · 0 comments · Fixed by #499
Closed

Unit tests emit deprecation warnings #498

tseaver opened this issue Jul 9, 2021 · 0 comments · Fixed by #499
Assignees
Labels
api: storage Issues related to the googleapis/python-storage API. type: process A process-related concern. May include testing, release, or the like.

Comments

@tseaver
Copy link
Contributor

tseaver commented Jul 9, 2021

$ .nox/unit-3-8/bin/py.test tests/unit/
============================= test session starts ==============================
platform linux -- Python 3.8.1, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /home/tseaver/projects/agendaless/Google/src/python-storage
plugins: cov-2.12.1
collected 1028 items                                                           

tests/unit/test__helpers.py ....................................         [  3%]
tests/unit/test__http.py .........                                       [  4%]
tests/unit/test__signing.py .s.......................................... [  8%]
......................................                                   [ 12%]
tests/unit/test_acl.py ................................................. [ 17%]
......................                                                   [ 19%]
tests/unit/test_batch.py ........................                        [ 21%]
tests/unit/test_blob.py ................................................ [ 26%]
........................................................................ [ 33%]
........................................................................ [ 40%]
........................................................................ [ 47%]
........................................................................ [ 54%]
...............................                                          [ 57%]
tests/unit/test_bucket.py .............................................. [ 61%]
........................................................................ [ 68%]
........................................................................ [ 75%]
..............................                                           [ 78%]
tests/unit/test_client.py .............................................. [ 83%]
.......................................................                  [ 88%]
tests/unit/test_fileio.py .................................              [ 91%]
tests/unit/test_hmac_key.py ..............................               [ 94%]
tests/unit/test_notification.py .............................            [ 97%]
tests/unit/test_retry.py ..........................                      [100%]

=============================== warnings summary ===============================
tests/unit/test_blob.py::Test_Blob::test_compose_w_if_generation_match_and_if_s_generation_match
  /home/tseaver/projects/agendaless/Google/src/python-storage/tests/unit/test_blob.py:4319: DeprecationWarning: ("'if_generation_match: type list' is deprecated and supported for backwards-compatability reasons only.  Use 'if_source_generation_match' instead' to match source objects' generations.",)
    destination.compose(

tests/unit/test_blob.py::Test_Blob::test_download_as_string_no_retry
  /home/tseaver/projects/agendaless/Google/src/python-storage/google/cloud/storage/blob.py:1516: PendingDeprecationWarning: Blob.download_as_string() is deprecated and will be removed in future.Use Blob.download_as_bytes() instead.
    warnings.warn(

tests/unit/test_blob.py::Test_Blob::test_upload_from_filename_with_num_retries
  /home/tseaver/projects/agendaless/Google/src/python-storage/google/cloud/storage/blob.py:2712: DeprecationWarning: `num_retries` has been deprecated and will be removed in a future release. Use the `retry` argument with a Retry or ConditionalRetryPolicy object, or None, instead.
    self.upload_from_file(

tests/unit/test_blob.py::Test_Blob::test_upload_from_string_w_text_w_num_retries
  /home/tseaver/projects/agendaless/Google/src/python-storage/google/cloud/storage/blob.py:2844: DeprecationWarning: `num_retries` has been deprecated and will be removed in a future release. Use the `retry` argument with a Retry or ConditionalRetryPolicy object, or None, instead.
    self.upload_from_file(

tests/unit/test_fileio.py::TestBlobWriterBinary::test_num_retries_and_retry_conflict
tests/unit/test_fileio.py::TestBlobWriterBinary::test_write
tests/unit/test_fileio.py::TestBlobWriterText::test_write
  /home/tseaver/projects/agendaless/Google/src/python-storage/google/cloud/storage/fileio.py:382: DeprecationWarning: `num_retries` has been deprecated and will be removed in a future release. Use the `retry` argument with a Retry or ConditionalRetryPolicy object, or None, instead.
    self._initiate_upload()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
================= 1027 passed, 1 skipped, 7 warnings in 11.15s =================
@tseaver tseaver added the type: process A process-related concern. May include testing, release, or the like. label Jul 9, 2021
@tseaver tseaver self-assigned this Jul 9, 2021
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Jul 9, 2021
tseaver added a commit that referenced this issue Jul 13, 2021
Test hygeine: avoid importing module-under-test at module scope

Closes #498.
cojenco pushed a commit to cojenco/python-storage that referenced this issue Oct 13, 2021
)

Test hygeine: avoid importing module-under-test at module scope

Closes googleapis#498.
cojenco pushed a commit to cojenco/python-storage that referenced this issue Oct 13, 2021
)

Test hygeine: avoid importing module-under-test at module scope

Closes googleapis#498.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/python-storage API. type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant