Skip to content

Commit

Permalink
Create the folder if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
blazs committed Jan 16, 2018
1 parent b1ada8e commit bf1daf4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import unittest
import shutil
import subprocess
import os

logging.basicConfig(level=logging.INFO,
format='%(asctime)-15s %(module)s:%(lineno)d [%(levelname)s] %(funcName)s %(message)s')
Expand All @@ -11,7 +12,11 @@ class TestCommands(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.status = 0

folder = 'TestOutputs'
if os.path.exists(folder):
os.mkdir(folder)

compact_product_id = 'S2A_MSIL1C_20170414T003551_N0204_R016_T54HVH_20170414T003551'
cls.status += subprocess.call('sentinelhub.aws --product {} -rf ./{}'.format(compact_product_id, folder),
shell=True)
Expand Down

0 comments on commit bf1daf4

Please sign in to comment.