diff --git a/pandas/tests/io/test_pickle.py b/pandas/tests/io/test_pickle.py index 930e547d5cba8..f07a4e3b58e86 100644 --- a/pandas/tests/io/test_pickle.py +++ b/pandas/tests/io/test_pickle.py @@ -283,8 +283,9 @@ def compress_file(self, src_path, dest_path, compression): raise ValueError(msg) if compression not in ["zip", "tar"]: - with open(src_path, "rb") as fh, f: - f.write(fh.read()) + with open(src_path, "rb") as fh: + with f: + f.write(fh.read()) def test_write_explicit(self, compression, get_random_path): base = get_random_path @@ -352,7 +353,6 @@ def test_read_explicit(self, compression, get_random_path): # read compressed file df2 = pd.read_pickle(p2, compression=compression) - tm.assert_frame_equal(df, df2) def test_read_infer(self, compression_ext, get_random_path): @@ -372,7 +372,6 @@ def test_read_infer(self, compression_ext, get_random_path): # read compressed file by inferred compression method df2 = pd.read_pickle(p2) - tm.assert_frame_equal(df, df2) diff --git a/pyproject.toml b/pyproject.toml index d30f700a54f80..e71344b9d8394 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,6 @@ disable = [ "attribute-defined-outside-init", "broad-except", "comparison-with-callable", - "confusing-with-statement", "dangerous-default-value", "deprecated-module", "eval-used",