-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Clean up pickle compression tests #19350
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
TST: Clean up pickle compression tests #19350
Conversation
pandas/tests/frame/test_to_csv.py
Outdated
@@ -925,22 +925,23 @@ def test_to_csv_compression(self, compression): | |||
[12.32112, 123123.2, 321321.2]], | |||
index=['A', 'B'], columns=['X', 'Y', 'Z']) | |||
|
|||
with ensure_clean() as filename: | |||
if compression != "zip": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could do
if compression == 'zip':
pytest.skip("not zip compression test for to_csv")
....
df.to_json(path, compression=compression) | ||
assert_frame_equal(df, pd.read_json(path, compression=compression)) | ||
if compression != 'zip': | ||
with tm.ensure_clean() as path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here (alternatively, you can make another fixed w/o zip), maybe compression_no_zip
is better
15e45a3
to
16328e0
Compare
lgtm. ping on green (or at least all linux builds on travis), seems mac may have some issues. |
Codecov Report
@@ Coverage Diff @@
## master #19350 +/- ##
==========================================
- Coverage 91.57% 91.56% -0.01%
==========================================
Files 150 150
Lines 48705 48704 -1
==========================================
- Hits 44600 44598 -2
- Misses 4105 4106 +1
Continue to review full report at Codecov.
|
@jreback it's green now, thanks! |
Thanks @reidy-p ! |
xref #19226
Move compression fixture to top-level
conftest.py
Clean-up compression tests in
pandas/tests/io/test_pickle.py
and add zip to thedecompress_file
testing utilityMake some minor adjustments to the json and csv compression tests to skip zip compression when it's not valid