1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 from __future__ import absolute_import
11 import arvados.commands.run as arv_run
12 from . import arvados_testutil as tutil
14 class ArvRunTestCase(unittest.TestCase, tutil.VersionChecker):
15 def run_arv_run(self, args):
16 sys.argv = ['arv-run'] + args
19 def test_unsupported_arg(self):
20 with self.assertRaises(SystemExit):
21 self.run_arv_run(['-x=unknown'])
23 def test_version_argument(self):
24 with tutil.redirected_streams(
25 stdout=tutil.StringIO, stderr=tutil.StringIO) as (out, err):
26 with self.assertRaises(SystemExit):
27 self.run_arv_run(['--version'])
28 self.assertVersionOutput(out, err)