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

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

Merged
merged 1 commit into from Apr 2, 2021

Conversation

andrewsg
Copy link
Contributor

No description provided.

@andrewsg andrewsg requested a review from a team March 30, 2021 18:25
@andrewsg andrewsg requested a review from a team as a code owner March 30, 2021 18:25
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/python-storage API. label Mar 30, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Mar 30, 2021
@andrewsg andrewsg requested a review from cojenco March 30, 2021 18:26
Copy link
Contributor

@cojenco cojenco left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@@ -388,7 +388,7 @@ def test_seek(self):
with self.assertRaises(ValueError):
pos = buff.tell()
buff.seek(len(TEST_BINARY_DATA) + 1)
self.assertEqual(pos, buff.tell())
self.assertEqual(pos, buff.tell())
Copy link
Member

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
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.

@andrewsg andrewsg added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 2, 2021
@yoshi-kokoro yoshi-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 master Apr 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
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. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants