summaryrefslogtreecommitdiff
path: root/tests/test_cmdline_tool.py
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2010-07-06 23:44:41 (GMT)
committerMarius Kintel <marius@kintel.net>2010-10-31 00:42:36 (GMT)
commit3000e9d5e8370054a92ad3c8beb9ac9a6a87a5c2 (patch)
treec534a3db8d198b8fa495189f9a7bb35bca6e456f /tests/test_cmdline_tool.py
parent9642787a2710324be48d99505a83f0d1f9f83a90 (diff)
Create expecteddir if necessary
Diffstat (limited to 'tests/test_cmdline_tool.py')
-rwxr-xr-xtests/test_cmdline_tool.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_cmdline_tool.py b/tests/test_cmdline_tool.py
index 79b4b35..66ca21c 100755
--- a/tests/test_cmdline_tool.py
+++ b/tests/test_cmdline_tool.py
@@ -59,9 +59,11 @@ def run_test(cmd, testfile):
outputdir = os.path.join(os.getcwd(), cmdname)
actualfilename = os.path.join(outputdir, test + "-actual.txt")
- expectedfilename = os.path.join(testdir, cmdname, test + "-expected.txt")
+ expecteddir = os.path.join(testdir, cmdname)
+ expectedfilename = os.path.join(expecteddir, test + "-expected.txt")
if options.generate:
+ if not os.path.exists(expecteddir): os.makedirs(expecteddir)
outputname = expectedfilename
else:
if not os.path.exists(outputdir): os.makedirs(outputdir)
contact: Jan Huwald // Impressum