File tree Expand file tree Collapse file tree 1 file changed +11
-28
lines changed Expand file tree Collapse file tree 1 file changed +11
-28
lines changed Original file line number Diff line number Diff line change 34
34
except :
35
35
noboto3 = True
36
36
37
+ # Check for fakes3
38
+ import subprocess
39
+ try :
40
+ ret_code = subprocess .check_call (['which' , 'fakes3' ], stdout = open (os .devnull , 'wb' ))
41
+ if ret_code == 0 :
42
+ fakes3_found = True
43
+ else :
44
+ fakes3_found = False
45
+ except :
46
+ fakes3_found = False
47
+
37
48
def test_datagrabber ():
38
49
dg = nio .DataGrabber ()
39
50
yield assert_equal , dg .inputs .template , Undefined
@@ -173,30 +184,6 @@ def test_datasink():
173
184
ds = nio .DataSink (infields = ['test' ])
174
185
yield assert_true , 'test' in ds .inputs .copyable_trait_names ()
175
186
176
- # Function to check for fakes3
177
- def _check_for_fakes3 ():
178
- '''
179
- Function used internally to check for fakes3 installation
180
- '''
181
-
182
- # Import packages
183
- import subprocess
184
-
185
- # Init variables
186
- fakes3_found = False
187
-
188
- # Check for fakes3
189
- try :
190
- ret_code = subprocess .check_call (['which' , 'fakes3' ], stdout = open (os .devnull , 'wb' ))
191
- if ret_code == 0 :
192
- fakes3_found = True
193
- except subprocess .CalledProcessError as exc :
194
- print 'fakes3 not found, install via \' gem install fakes3\' , skipping test...'
195
- except :
196
- print 'Unable to check for fakes3 installation, skipping test...'
197
-
198
- # Return if found
199
- return fakes3_found
200
187
201
188
def _make_dummy_input ():
202
189
'''
@@ -216,10 +203,6 @@ def _make_dummy_input():
216
203
# Return path
217
204
return input_path
218
205
219
- # Check for fakes3
220
- fakes3 = _check_for_fakes3 ()
221
-
222
-
223
206
@skipif (noboto3 or not fakes3 )
224
207
# Test datasink writes to s3 properly
225
208
def test_datasink_to_s3 ():
You can’t perform that action at this time.
0 commit comments