Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

fix: Ensure consistency check in test runs even if expected error occurs - #402

Merged
andrewsg merged 1 commit into
masterfrom
fileio-cover
Apr 2, 2021
Merged

fix: Ensure consistency check in test runs even if expected error occurs#402
andrewsg merged 1 commit into
masterfrom
fileio-cover

Conversation

@andrewsg

Copy link
Copy Markdown
Contributor

No description provided.

@andrewsg
andrewsg requested review from a teamMarch 30, 2021 18:25
@product-auto-labelproduct-auto-labelBot added the api: storage Issues related to the googleapis/python-storage API. label Mar 30, 2021
@google-clagoogle-claBot added the cla: yes This human has signed the Contributor License Agreement. label Mar 30, 2021
@andrewsg
andrewsg requested a review from cojencoMarch 30, 2021 18:26

@cojencocojenco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

pos = buff.tell()
buff.seek(len(TEST_BINARY_DATA) + 1)
self.assertEqual(pos, buff.tell())
self.assertEqual(pos, buff.tell())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happened here? is there more context

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 390 raises the exception in which the destination byte is not contained in buffer, so the test never hits Line 391. This change ensures all assertions are run.

@andrewsgandrewsg added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 2, 2021
@yoshi-kokoroyoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 2, 2021
@andrewsg
andrewsg merged commit 416bcd4 into masterApr 2, 2021
@andrewsg
andrewsg deleted the fileio-cover branch April 2, 2021 21:26
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@release-pleaserelease-pleaseBot mentioned this pull request Jan 12, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storageIssues related to the googleapis/python-storage API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@andrewsg@frankyn@cojenco@yoshi-kokoro