Skip to content

TST: make flaky zip check less strict #40837

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

Merged
merged 3 commits into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pandas/tests/io/test_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,13 @@ def test_to_read_gcs(gcs_buffer, format):

def assert_equal_zip_safe(result: bytes, expected: bytes):
"""
We would like to assert these are equal, but the 11th byte is a last-modified
timestamp, which in some builds is off-by-one, so we check around that.
We would like to assert these are equal, but the 10th and 11th bytes are a
last-modified timestamp, which in some builds is off-by-one, so we check around
that.

See https://en.wikipedia.org/wiki/ZIP_(file_format)#File_headers
"""
assert result[:10] == expected[:10]
assert result[:9] == expected[:9]
assert result[11:] == expected[11:]


Expand Down