Various test cases for the Script class
Definition at line 11 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 17 of file test_validationscript.py.
17 def test_parse_header(self):
19 Test if the xml header in validation scripts are parsed properly
21 with tempfile.NamedTemporaryFile()
as tf:
22 tf.write(b
'#!/usr/bin/env python3\n'
23 b
'# -*- coding: utf-8 -*-\n'
26 b
'<interval>release</interval>'
27 b
'<output>EvtGenSim.root</output>\n'
28 b
'<contact>Thomas Kuhr thomas.kuhr@lmu.de</contact>\n'
29 b
'<description>description_text</description>\n'
37 script = validationscript.Script(tf.name,
"package",
None)
40 self.assertEqual(
"description_text", script.header[
"description"])
41 self.assertEqual(
"Thomas Kuhr thomas.kuhr@lmu.de", script.header[
"contact"][0])
42 self.assertEqual(1, len(script.header[
"output"]))
43 self.assertEqual(
"EvtGenSim.root", script.header[
"output"][0])
44 self.assertEqual(
"release", script.header[
"interval"])
The documentation for this class was generated from the following file: