Skip to content

Commit

Permalink
[test/parser_] Fix dir create on clean system
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsonntag committed Apr 22, 2020
1 parent fe9d562 commit bc4cf60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/test_parser_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ def setUp(self):
self.json_reader = dict_parser.DictReader(show_warnings=False)

dir_name = os.path.basename(os.path.splitext(__file__)[0])
tmp_dir_path = os.path.join(tempfile.gettempdir(), "odml_test", dir_name)
tmp_base_path = os.path.join(tempfile.gettempdir(), "odml_test")
if not os.path.exists(tmp_base_path):
os.mkdir(tmp_base_path)

tmp_dir_path = os.path.join(tmp_base_path, dir_name)
if not os.path.exists(tmp_dir_path):
os.mkdir(tmp_dir_path)

Expand Down
5 changes: 4 additions & 1 deletion test/test_parser_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ def setUp(self):
self.yaml_reader = dict_parser.DictReader(show_warnings=False)

dir_name = os.path.basename(os.path.splitext(__file__)[0])
tmp_dir_path = os.path.join(tempfile.gettempdir(), "odml_test", dir_name)
tmp_base_path = os.path.join(tempfile.gettempdir(), "odml_test")
if not os.path.exists(tmp_base_path):
os.mkdir(tmp_base_path)

tmp_dir_path = os.path.join(tmp_base_path, dir_name)
if not os.path.exists(tmp_dir_path):
os.mkdir(tmp_dir_path)

Expand Down

0 comments on commit bc4cf60

Please sign in to comment.