1
0
mirror of synced 2024-11-22 09:14:23 +01:00

Improve a cli test resilience

This commit is contained in:
jvoisin 2018-09-06 11:32:29 +02:00
parent c8c27dcf38
commit 2e9adab86a

View File

@ -50,7 +50,10 @@ class TestReturnValue(unittest.TestCase):
class TestCleanFolder(unittest.TestCase): class TestCleanFolder(unittest.TestCase):
def test_jpg(self): def test_jpg(self):
os.mkdir('./tests/data/folder/') try:
os.mkdir('./tests/data/folder/')
except FileExistsError:
pass
shutil.copy('./tests/data/dirty.jpg', './tests/data/folder/clean1.jpg') shutil.copy('./tests/data/dirty.jpg', './tests/data/folder/clean1.jpg')
shutil.copy('./tests/data/dirty.jpg', './tests/data/folder/clean2.jpg') shutil.copy('./tests/data/dirty.jpg', './tests/data/folder/clean2.jpg')