1 from __future__ import absolute_import
7 import arvados.commands.run as arv_run
8 from . import arvados_testutil as tutil
10 class ArvRunTestCase(unittest.TestCase, tutil.VersionChecker):
11 def run_arv_run(self, args):
12 sys.argv = ['arv-run'] + args
15 def test_unsupported_arg(self):
16 with self.assertRaises(SystemExit):
17 self.run_arv_run(['-x=unknown'])
19 def test_version_argument(self):
20 with tutil.redirected_streams(
21 stdout=tutil.StringIO, stderr=tutil.StringIO) as (out, err):
22 with self.assertRaises(SystemExit):
23 self.run_arv_run(['--version'])
24 self.assertVersionOutput(out, err)