3 from odltools import cli
4 from odltools.csit import robotfiles
7 class TestOdltools(unittest.TestCase):
8 DATAPATH = "/tmp/output_01_l2.xml.gz"
9 OUTPATH = "/tmp/robotjob"
11 def test_parser_empty(self):
12 parser = cli.create_parser()
13 with self.assertRaises(SystemExit) as cm:
15 self.assertEqual(cm.exception.code, 2)
17 def test_parser_help(self):
18 parser = cli.create_parser()
19 with self.assertRaises(SystemExit) as cm:
20 parser.parse_args(['-h'])
21 self.assertEqual(cm.exception.code, 0)
23 def test_robotfiles_run(self):
24 parser = cli.create_parser()
25 args = parser.parse_args(['csit', self.DATAPATH, self.OUTPATH, '-g'])
29 parser = cli.create_parser()
30 args = parser.parse_args(['csit', self.DATAPATH, self.OUTPATH, '-g', '-d'])
33 if __name__ == '__main__':