2 # Copyright (C) The Arvados Authors. All rights reserved.
4 # SPDX-License-Identifier: AGPL-3.0
12 import arvnodeman.launcher as nodeman
13 from . import testutil
15 class ArvNodemArgumentsTestCase(unittest.TestCase):
16 def run_nodeman(self, args):
17 return nodeman.main(args)
19 def test_unsupported_arg(self):
20 with self.assertRaises(SystemExit):
21 self.run_nodeman(['-x=unknown'])
23 def test_version_argument(self):
26 with testutil.redirected_streams(stdout=out, stderr=err):
27 with self.assertRaises(SystemExit):
28 self.run_nodeman(['--version'])
29 self.assertEqual(out.getvalue(), '')
30 self.assertRegexpMatches(err.getvalue(), "[0-9]+\.[0-9]+\.[0-9]+")