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

@andrewsg andrewsg commented Mar 30, 2021

No description provided.

@andrewsg andrewsg requested a review from Mar 30, 2021
@andrewsg andrewsg requested a review from as a code owner Mar 30, 2021
@google-cla google-cla bot added the cla: yes label Mar 30, 2021
@andrewsg andrewsg requested a review from cojenco Mar 30, 2021
Copy link
Contributor

@cojenco cojenco left a comment

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

@frankyn frankyn Mar 30, 2021

what happened here? is there more context

Copy link
Contributor

@cojenco cojenco Apr 1, 2021

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.

frankyn
frankyn approved these changes Apr 1, 2021
@andrewsg andrewsg merged commit 416bcd4 into master Apr 2, 2021
3 checks passed
@andrewsg andrewsg deleted the fileio-cover branch Apr 2, 2021
cojenco added a commit to cojenco/python-storage that referenced this issue Oct 13, 2021
cojenco added a commit to cojenco/python-storage that referenced this issue Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants