@@ -60,6 +60,8 @@ def tips_df(datapath):
60
60
@td .skip_if_not_us_locale ()
61
61
class TestS3 (object ):
62
62
63
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
64
+ 'causing a Resourcewarning' )
63
65
def test_parse_public_s3_bucket (self , tips_df ):
64
66
pytest .importorskip ('s3fs' )
65
67
@@ -78,6 +80,8 @@ def test_parse_public_s3_bucket(self, tips_df):
78
80
assert not df .empty
79
81
tm .assert_frame_equal (df , tips_df )
80
82
83
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
84
+ 'causing a Resourcewarning' )
81
85
def test_parse_public_s3n_bucket (self , tips_df ):
82
86
83
87
# Read from AWS s3 as "s3n" URL
@@ -86,13 +90,17 @@ def test_parse_public_s3n_bucket(self, tips_df):
86
90
assert not df .empty
87
91
tm .assert_frame_equal (tips_df .iloc [:10 ], df )
88
92
93
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
94
+ 'causing a Resourcewarning' )
89
95
def test_parse_public_s3a_bucket (self , tips_df ):
90
96
# Read from AWS s3 as "s3a" URL
91
97
df = read_csv ('s3a://pandas-test/tips.csv' , nrows = 10 )
92
98
assert isinstance (df , DataFrame )
93
99
assert not df .empty
94
100
tm .assert_frame_equal (tips_df .iloc [:10 ], df )
95
101
102
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
103
+ 'causing a Resourcewarning' )
96
104
def test_parse_public_s3_bucket_nrows (self , tips_df ):
97
105
for ext , comp in [('' , None ), ('.gz' , 'gzip' ), ('.bz2' , 'bz2' )]:
98
106
df = read_csv ('s3://pandas-test/tips.csv' +
@@ -101,6 +109,8 @@ def test_parse_public_s3_bucket_nrows(self, tips_df):
101
109
assert not df .empty
102
110
tm .assert_frame_equal (tips_df .iloc [:10 ], df )
103
111
112
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
113
+ 'causing a Resourcewarning' )
104
114
def test_parse_public_s3_bucket_chunked (self , tips_df ):
105
115
# Read with a chunksize
106
116
chunksize = 5
@@ -118,6 +128,8 @@ def test_parse_public_s3_bucket_chunked(self, tips_df):
118
128
chunksize * i_chunk : chunksize * (i_chunk + 1 )]
119
129
tm .assert_frame_equal (true_df , df )
120
130
131
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
132
+ 'causing a Resourcewarning' )
121
133
def test_parse_public_s3_bucket_chunked_python (self , tips_df ):
122
134
# Read with a chunksize using the Python parser
123
135
chunksize = 5
@@ -135,6 +147,8 @@ def test_parse_public_s3_bucket_chunked_python(self, tips_df):
135
147
chunksize * i_chunk : chunksize * (i_chunk + 1 )]
136
148
tm .assert_frame_equal (true_df , df )
137
149
150
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
151
+ 'causing a Resourcewarning' )
138
152
def test_parse_public_s3_bucket_python (self , tips_df ):
139
153
for ext , comp in [('' , None ), ('.gz' , 'gzip' ), ('.bz2' , 'bz2' )]:
140
154
df = read_csv ('s3://pandas-test/tips.csv' + ext , engine = 'python' ,
@@ -143,6 +157,8 @@ def test_parse_public_s3_bucket_python(self, tips_df):
143
157
assert not df .empty
144
158
tm .assert_frame_equal (df , tips_df )
145
159
160
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
161
+ 'causing a Resourcewarning' )
146
162
def test_infer_s3_compression (self , tips_df ):
147
163
for ext in ['' , '.gz' , '.bz2' ]:
148
164
df = read_csv ('s3://pandas-test/tips.csv' + ext ,
@@ -151,6 +167,8 @@ def test_infer_s3_compression(self, tips_df):
151
167
assert not df .empty
152
168
tm .assert_frame_equal (df , tips_df )
153
169
170
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
171
+ 'causing a Resourcewarning' )
154
172
def test_parse_public_s3_bucket_nrows_python (self , tips_df ):
155
173
for ext , comp in [('' , None ), ('.gz' , 'gzip' ), ('.bz2' , 'bz2' )]:
156
174
df = read_csv ('s3://pandas-test/tips.csv' + ext , engine = 'python' ,
@@ -159,6 +177,8 @@ def test_parse_public_s3_bucket_nrows_python(self, tips_df):
159
177
assert not df .empty
160
178
tm .assert_frame_equal (tips_df .iloc [:10 ], df )
161
179
180
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
181
+ 'causing a Resourcewarning' )
162
182
def test_s3_fails (self ):
163
183
with pytest .raises (IOError ):
164
184
read_csv ('s3://nyqpug/asdf.csv' )
@@ -168,6 +188,8 @@ def test_s3_fails(self):
168
188
with pytest .raises (IOError ):
169
189
read_csv ('s3://cant_get_it/' )
170
190
191
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
192
+ 'causing a Resourcewarning' )
171
193
def test_read_csv_handles_boto_s3_object (self ,
172
194
s3_resource ,
173
195
tips_file ):
@@ -184,6 +206,8 @@ def test_read_csv_handles_boto_s3_object(self,
184
206
expected = read_csv (tips_file )
185
207
tm .assert_frame_equal (result , expected )
186
208
209
+ @pytest .mark .skip ('trying to find unclosed socket causing that is '
210
+ 'causing a Resourcewarning' )
187
211
def test_read_csv_chunked_download (self , s3_resource , caplog ):
188
212
# 8 MB, S3FS usees 5MB chunks
189
213
df = DataFrame (np .random .randn (100000 , 4 ), columns = list ('abcd' ))
0 commit comments