projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '19513-create-role-admin-only'
[arvados.git]
/
sdk
/
python
/
tests
/
test_arv_ws.py
diff --git
a/sdk/python/tests/test_arv_ws.py
b/sdk/python/tests/test_arv_ws.py
index 5a018273a4d0c8aa6b35970cbb151227083e0a47..521c46ee34e72df4c25fc3a7f0dcbe2cdce379b6 100644
(file)
--- a/
sdk/python/tests/test_arv_ws.py
+++ b/
sdk/python/tests/test_arv_ws.py
@@
-1,13
+1,28
@@
-#!/usr/bin/env python
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+from __future__ import absolute_import
+import os
+import sys
+import tempfile
import unittest
import unittest
+
import arvados.errors as arv_error
import arvados.commands.ws as arv_ws
import arvados.errors as arv_error
import arvados.commands.ws as arv_ws
+from . import arvados_testutil as tutil
-class ArvWsTestCase(unittest.TestCase):
+class ArvWsTestCase(unittest.TestCase
, tutil.VersionChecker
):
def run_ws(self, args):
return arv_ws.main(args)
def test_unsupported_arg(self):
with self.assertRaises(SystemExit):
self.run_ws(['-x=unknown'])
def run_ws(self, args):
return arv_ws.main(args)
def test_unsupported_arg(self):
with self.assertRaises(SystemExit):
self.run_ws(['-x=unknown'])
+
+ def test_version_argument(self):
+ with tutil.redirected_streams(
+ stdout=tutil.StringIO, stderr=tutil.StringIO) as (out, err):
+ with self.assertRaises(SystemExit):
+ self.run_ws(['--version'])
+ self.assertVersionOutput(out, err)