13import validationscript
 
   21    Various test cases for the Script 
class 
   26        Test if the xml header 
in validation scripts are parsed properly
 
   28        with tempfile.NamedTemporaryFile() 
as tf:
 
   30                b
"#!/usr/bin/env python3\n" 
   33                b
"<interval>release</interval>" 
   34                b
"<output>EvtGenSim.root</output>\n" 
   35                b
"<contact>Thomas Kuhr thomas.kuhr@lmu.de</contact>\n" 
   36                b
"<description>description_text</description>\n" 
   45            script = validationscript.Script(tf.name, 
"package", 
None)
 
   48            self.assertEqual(
"description_text", script.description)
 
   50                "Thomas Kuhr thomas.kuhr@lmu.de", script.contact[0]
 
   52            self.assertEqual(1, len(script.output_files))
 
   53            self.assertEqual(
"EvtGenSim.root", script.output_files[0])
 
   54            self.assertEqual(
"release", script.interval)
 
   57if __name__ == 
"__main__":
 
def test_parse_header(self)