From 356cd58e06e38ace4a4ea65ac0cbbdbe910e5dfc Mon Sep 17 00:00:00 2001 From: Jeff Balogh Date: Fri, 30 May 2008 19:52:14 -0400 Subject: create the test output directory if it doesn't already exist. codecs.open was failing without it. --- test-markdown.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test-markdown.py') 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) -- cgit v1.2.3