aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Balogh <its.jeff.balogh@gmail.com>2008-05-30 19:52:14 -0400
committerYuri Takhteyev <yuri@freewisdom.org>2008-05-30 19:27:54 -0700
commit356cd58e06e38ace4a4ea65ac0cbbdbe910e5dfc (patch)
treebfea06d60e6cf75366df685e7c1b30f2cf102278
parent399eee729240a0b2aeb16a27594b6c141ca1d6e1 (diff)
downloadmarkdown-356cd58e06e38ace4a4ea65ac0cbbdbe910e5dfc.tar.gz
markdown-356cd58e06e38ace4a4ea65ac0cbbdbe910e5dfc.tar.bz2
markdown-356cd58e06e38ace4a4ea65ac0cbbdbe910e5dfc.zip
create the test output directory if it doesn't already exist.
codecs.open was failing without it.
-rw-r--r--test-markdown.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test-markdown.py b/test-markdown.py
index e3997a4..bc2b891 100644
--- a/test-markdown.py
+++ b/test-markdown.py
@@ -214,6 +214,9 @@ def testDirectory(dir, measure_time=False, safe_mode=False) :
except:
hd = None
+ if not os.path.exists(TMP_DIR):
+ os.mkdir(TMP_DIR)
+
htmlDiffFilePath = os.path.join(TMP_DIR, os.path.split(dir)[-1]) + ".html"
htmlDiffFile = codecs.open(htmlDiffFilePath, "w", encoding=encoding)
htmlDiffFile.write(DIFF_FILE_TEMPLATE)