1 from __future__ import absolute_import
7 import arvados.commands.arv_copy as arv_copy
8 from . import arvados_testutil as tutil
10 class ArvCopyTestCase(unittest.TestCase, tutil.VersionChecker):
11 def run_copy(self, args):
12 sys.argv = ['arv-copy'] + args
13 return arv_copy.main()
15 def test_unsupported_arg(self):
16 with self.assertRaises(SystemExit):
17 self.run_copy(['-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_copy(['--version'])
24 self.assertVersionOutput(out, err)