File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 32
32
# KAGGLE_KEY=local_api_token
33
33
# KAGGLE_USERNAME=<kaggle-user-name>
34
34
35
+ # Add those envars to the Python Tests>Unittest template to
36
+ # make running individual tests easier.
37
+
35
38
test_user = api .config_values ['username' ]
36
39
model_title = 'testing'
37
40
instance_name = 'test'
@@ -55,7 +58,7 @@ def tearDownModule():
55
58
if os .path .exists (file ):
56
59
os .remove (file )
57
60
file = os .path .join (kernel_directory , api .KERNEL_METADATA_FILE )
58
- if os .path .exists :
61
+ if os .path .exists ( file ) :
59
62
os .remove (file )
60
63
file = os .path .join (model_directory , api .MODEL_METADATA_FILE )
61
64
if os .path .exists (file ):
@@ -285,7 +288,7 @@ def test_kernels_g_pull(self):
285
288
286
289
# Competitions
287
290
288
- def test_competitions_a_list (self ):
291
+ def test_competition_a_list (self ):
289
292
try :
290
293
competitions = api .competitions_list ()
291
294
self .assertGreater (len (competitions ), 0 ) # Assuming there should be some competitions
@@ -335,6 +338,7 @@ def test_competition_f_download_files(self):
335
338
try :
336
339
api .competition_download_files (competition )
337
340
self .assertTrue (os .path .exists (f'{ competition } .zip' ))
341
+ self .assertTrue (os .path .getsize (f'{ competition } .zip' ) > 0 )
338
342
except ApiException as e :
339
343
self .fail (f"competition_download_files failed: { e } " )
340
344
finally :
You can’t perform that action at this time.
0 commit comments