Skip to content

TST: Avoid time dependency in GCS zip test #44552

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
Nov 22, 2021

Conversation

mroeschke
Copy link
Member

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

To avoid CI flakiness from this test, only compare the checksum of the ZIP contents to avoid comparing the flaky last modified timestamp of the ZIP archive. IMO, the CI stability is worth the the trade off of being a little less strict here.

cc @jbrockmendel

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Nov 21, 2021
@jbrockmendel
Copy link
Member

this is fantastic

@mroeschke mroeschke added this to the 1.4 milestone Nov 21, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

can you rebase as well

assert result[11:] == expected[11:]
if compression == "zip":
# Only compare the CRC checksum of the file contents
res = zipfile.ZipFile(BytesIO(result))
Copy link
Contributor

Choose a reason for hiding this comment

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

don't you need to do these in with clauses?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fair point. Changed.

@jbrockmendel
Copy link
Member

LGTM

@mroeschke mroeschke merged commit 23176c0 into pandas-dev:master Nov 22, 2021
@mroeschke mroeschke deleted the test/flakey_gcs_zip branch November 22, 2021 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants