def tcase_setup(trun, parent, tcase_fname):
<EOL>case = copy.deepcopy(TESTCASE)<EOL>case["<STR_LIT>"] = tcase_fname<EOL>case["<STR_LIT>"] = os.sep.join([trun["<STR_LIT>"]["<STR_LIT>"], case["<STR_LIT>"]])<EOL>if not os.path.exists(case["<STR_LIT>"]):<EOL><INDENT>cij.err('<STR_LIT>' % case["<STR_LIT>"])<EOL>return None<EOL><DEDENT>case["<STR_LIT:name>"] = os.path.splitext(case["<STR_LIT>"])[<NUM_LIT:0>]<EOL>case["<STR_LIT>"] = "<STR_LIT:/>".join([parent["<STR_LIT>"], case["<STR_LIT>"]])<EOL>case["<STR_LIT>"] = os.sep.join([parent["<STR_LIT>"], case["<STR_LIT>"]])<EOL>case["<STR_LIT>"] = os.sep.join([case["<STR_LIT>"], "<STR_LIT>"])<EOL>case["<STR_LIT>"] = os.sep.join([case["<STR_LIT>"], "<STR_LIT>"])<EOL>case["<STR_LIT>"] = os.sep.join([case["<STR_LIT>"], case["<STR_LIT>"]])<EOL>case["<STR_LIT>"].update(copy.deepcopy(parent["<STR_LIT>"]))<EOL>os.makedirs(case["<STR_LIT>"])                       <EOL>os.makedirs(case["<STR_LIT>"])<EOL>shutil.copyfile(case["<STR_LIT>"], case["<STR_LIT>"])  <EOL>case["<STR_LIT>"] = hooks_setup(trun, case, parent.get("<STR_LIT>"))<EOL>return case<EOL>
Create and initialize a testcase