1 # Copyright 2018 Red Hat, Inc. and others. All Rights Reserved.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 from odltools import cli
17 from odltools.csit import robotfiles
20 class TestOdltools(unittest.TestCase):
21 DATAPATH = "/tmp/output_01_l2.xml.gz"
22 OUTPATH = "/tmp/robotjob"
24 def test_parser_empty(self):
25 parser = cli.create_parser()
26 with self.assertRaises(SystemExit) as cm:
28 self.assertEqual(cm.exception.code, 2)
30 def test_parser_help(self):
31 parser = cli.create_parser()
32 with self.assertRaises(SystemExit) as cm:
33 parser.parse_args(['-h'])
34 self.assertEqual(cm.exception.code, 0)
36 @unittest.skip("skipping")
37 def test_robotfiles_run(self):
38 parser = cli.create_parser()
39 args = parser.parse_args(['csit', self.DATAPATH, self.OUTPATH, '-g'])
42 @unittest.skip("skipping")
44 parser = cli.create_parser()
45 args = parser.parse_args(['csit', self.DATAPATH, self.OUTPATH, '-g', '-d'])
49 if __name__ == '__main__':