From 6e3ba93c774ee834af42c6bc114e7dcef1242b52 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 15 Mar 2017 18:46:52 +0100 Subject: [PATCH] fix tests with ~/.config --- tests/test_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_import.py b/tests/test_import.py index 7a63921..7276f95 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -90,7 +90,9 @@ class TestImport(unittest.TestCase): dotfile2, content2 = create_random_file(os.path.expanduser('~')) self.addCleanup(clean, dotfile2) homeconf = os.path.join(os.path.expanduser('~'), '.config') - os.mkdir(homeconf) + if not os.path.exists(homeconf): + os.mkdir(homeconf) + self.addCleanup(clean, homeconf) dotconfig = os.path.join(homeconf, get_string(5)) create_dir(dotconfig) self.addCleanup(clean, dotconfig)