2 # -*- coding: utf-8 -*-
4 from __future__ import absolute_import
10 import arvados.commands.run as arv_run
11 from . import arvados_testutil as tutil
13 class ArvRunTestCase(unittest.TestCase, tutil.VersionChecker):
14 def run_arv_run(self, args):
15 sys.argv = ['arv-run'] + args
18 def test_unsupported_arg(self):
19 with self.assertRaises(SystemExit):
20 self.run_arv_run(['-x=unknown'])
22 def test_version_argument(self):
23 with tutil.redirected_streams(
24 stdout=tutil.StringIO, stderr=tutil.StringIO) as (out, err):
25 with self.assertRaises(SystemExit):
26 self.run_arv_run(['--version'])
27 self.assertVersionOutput(out, err)