diff options
author | Marius Kintel <marius@kintel.net> | 2010-07-06 23:44:41 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2010-10-31 00:42:36 (GMT) |
commit | 3000e9d5e8370054a92ad3c8beb9ac9a6a87a5c2 (patch) | |
tree | c534a3db8d198b8fa495189f9a7bb35bca6e456f /tests/test_cmdline_tool.py | |
parent | 9642787a2710324be48d99505a83f0d1f9f83a90 (diff) |
Create expecteddir if necessary
Diffstat (limited to 'tests/test_cmdline_tool.py')
-rwxr-xr-x | tests/test_cmdline_tool.py | 4 |
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) |