Various test cases for the Script class
Definition at line 18 of file test_validationscript.py.
◆ test_parse_header()
def test_parse_header |
( |
|
self | ) |
|
Test if the xml header in validation scripts are parsed properly
Definition at line 24 of file test_validationscript.py.
24 def test_parse_header(self):
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"
31 b
"# -*- coding: utf-8 -*-\n"
34 b
"<interval>release</interval>"
35 b
"<output>EvtGenSim.root</output>\n"
36 b
"<contact>Thomas Kuhr thomas.kuhr@lmu.de</contact>\n"
37 b
"<description>description_text</description>\n"
46 script = validationscript.Script(tf.name,
"package",
None)
49 self.assertEqual(
"description_text", script.description)
51 "Thomas Kuhr thomas.kuhr@lmu.de", script.contact[0]
53 self.assertEqual(1, len(script.output_files))
54 self.assertEqual(
"EvtGenSim.root", script.output_files[0])
55 self.assertEqual(
"release", script.interval)
The documentation for this class was generated from the following file: