From 46f38f70802c5395a7dbfeaa13122bfacc03ff2f Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 15 Mar 2017 21:39:01 +0100 Subject: [PATCH] do not mkdir when already exists in tests --- tests/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/helpers.py b/tests/helpers.py index d72638a..fdb9ee7 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -49,7 +49,8 @@ def create_random_file(folder, content=None): def create_dir(path): '''Create a folder''' - os.mkdir(path) + if not os.path.exists(path): + os.mkdir(path) return path