9 import arvnodeman.launcher as nodeman
10 from . import testutil
12 class ArvNodemArgumentsTestCase(unittest.TestCase):
13 def run_nodeman(self, args):
14 return nodeman.main(args)
16 def test_unsupported_arg(self):
17 with self.assertRaises(SystemExit):
18 self.run_nodeman(['-x=unknown'])
20 def test_version_argument(self):
23 with testutil.redirected_streams(stdout=out, stderr=err):
24 with self.assertRaises(SystemExit):
25 self.run_nodeman(['--version'])
26 self.assertEqual(out.getvalue(), '')
27 self.assertRegexpMatches(err.getvalue(), "[0-9]+\.[0-9]+\.[0-9]+")