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 3434except :
3535 noboto3 = True
3636
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+
3748def test_datagrabber ():
3849 dg = nio .DataGrabber ()
3950 yield assert_equal , dg .inputs .template , Undefined
@@ -173,30 +184,6 @@ def test_datasink():
173184 ds = nio .DataSink (infields = ['test' ])
174185 yield assert_true , 'test' in ds .inputs .copyable_trait_names ()
175186
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
200187
201188def _make_dummy_input ():
202189 '''
@@ -216,10 +203,6 @@ def _make_dummy_input():
216203 # Return path
217204 return input_path
218205
219- # Check for fakes3
220- fakes3 = _check_for_fakes3 ()
221-
222-
223206@skipif (noboto3 or not fakes3 )
224207# Test datasink writes to s3 properly
225208def test_datasink_to_s3 ():
You can’t perform that action at this time.
0 commit comments