Skip to content

CI: fix flaky tests #39310

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 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion pandas/tests/io/pytables/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,8 @@ def test_select_as_multiple(setup_path):
)
expected = concat([df1, df2], axis=1)
expected = expected[(expected.A > 0) & (expected.B > 0)]
tm.assert_frame_equal(result, expected)
tm.assert_frame_equal(result, expected, check_freq=False)
# FIXME: 2021-01-20 this is failing with freq None vs 4B on some builds

# multiple (diff selector)
result = store.select_as_multiple(
Expand Down
10 changes: 9 additions & 1 deletion pandas/tests/io/test_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,15 @@ def test_to_csv_compression_encoding_gcs(gcs_buffer, compression_only, encoding)
compression["method"] = "infer"
path_gcs += f".{compression_only}"
df.to_csv(path_gcs, compression=compression, encoding=encoding)
assert gcs_buffer.getvalue() == buffer.getvalue()

res = gcs_buffer.getvalue()
expected = buffer.getvalue()
# 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
# See https://en.wikipedia.org/wiki/ZIP_(file_format)#File_headers
assert res[:10] == expected[:10]
assert res[11:] == expected[11:]

read_df = read_csv(path_gcs, index_col=0, compression="infer", encoding=encoding)
tm.assert_frame_equal(df, read_df)

Expand Down