[ARVADOS] updated: 5de6e729142a497ecb6e6dc40e2239cae07cd18d
git at public.curoverse.com
git at public.curoverse.com
Fri Jan 31 17:58:41 EST 2014
Summary of changes:
sdk/cli/Gemfile.lock | 2 +-
sdk/cli/test/test_arv-tag.rb | 10 +++++-----
sdk/python/arvados/util.py | 9 ++-------
3 files changed, 8 insertions(+), 13 deletions(-)
via 5de6e729142a497ecb6e6dc40e2239cae07cd18d (commit)
from 013efe3cfb6e53b372be1f785646e76a7965a948 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 5de6e729142a497ecb6e6dc40e2239cae07cd18d
Author: Tim Pierce <twp at curoverse.com>
Date: Fri Jan 31 17:59:04 2014 -0500
Fix some arv unit tests.
diff --git a/sdk/cli/Gemfile.lock b/sdk/cli/Gemfile.lock
index c3ee0f0..ab2391a 100644
--- a/sdk/cli/Gemfile.lock
+++ b/sdk/cli/Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- arvados-cli (0.1.20140128160501)
+ arvados-cli (0.1.20140130154213)
activesupport (~> 3.2, >= 3.2.13)
andand (~> 1.3, >= 1.3.3)
curb (~> 0.8)
diff --git a/sdk/cli/test/test_arv-tag.rb b/sdk/cli/test/test_arv-tag.rb
index c095de5..0e6aa2b 100644
--- a/sdk/cli/test/test_arv-tag.rb
+++ b/sdk/cli/test/test_arv-tag.rb
@@ -21,12 +21,12 @@ class TestArvTag < Minitest::Test
def test_single_tag_single_obj
# Add a single tag.
tag_uuid, err = capture_subprocess_io do
- assert arv_tag 'add', 'test_tag1', '--object', 'uuid1'
+ assert arv_tag '--short', 'add', 'test_tag1', '--object', 'uuid1'
end
assert_empty err
out, err = capture_subprocess_io do
- assert arv '-h', 'link', 'show', '--uuid', tag_uuid.rstrip
+ assert arv 'link', 'show', '--uuid', tag_uuid.rstrip
end
assert_empty err
@@ -35,7 +35,7 @@ class TestArvTag < Minitest::Test
# Remove the tag.
out, err = capture_subprocess_io do
- assert arv_tag '-h', 'remove', 'test_tag1', '--object', 'uuid1'
+ assert arv_tag 'remove', 'test_tag1', '--object', 'uuid1'
end
assert_empty err
@@ -45,7 +45,7 @@ class TestArvTag < Minitest::Test
# Verify that the link no longer exists.
out, err = capture_subprocess_io do
- assert_equal false, arv('-h', 'link', 'show', '--uuid', links[0]['uuid'])
+ assert_equal false, arv('link', 'show', '--uuid', links[0]['uuid'])
end
assert_equal "Error: Path not found\n", err
@@ -62,7 +62,7 @@ class TestArvTag < Minitest::Test
assert_empty err
out, err = capture_subprocess_io do
- assert arv '-h', 'link', 'list', '--where', '{"link_class":"tag","name":"test_tag1"}'
+ assert arv 'link', 'list', '--where', '{"link_class":"tag","name":"test_tag1"}'
end
assert_empty err
diff --git a/sdk/python/arvados/util.py b/sdk/python/arvados/util.py
index 9286795..4e0d6f0 100644
--- a/sdk/python/arvados/util.py
+++ b/sdk/python/arvados/util.py
@@ -225,7 +225,7 @@ def collection_extract(collection, path, files=[], decompress=True):
files_got += [outname]
if os.path.exists(os.path.join(path, stream_name, outname)):
continue
- util.mkdir_dash_p(os.path.dirname(os.path.join(path, stream_name, outname)))
+ mkdir_dash_p(os.path.dirname(os.path.join(path, stream_name, outname)))
outfile = open(os.path.join(path, stream_name, outname), 'wb')
for buf in (f.readall_decompressed() if decompress
else f.readall()):
@@ -243,12 +243,7 @@ def collection_extract(collection, path, files=[], decompress=True):
def mkdir_dash_p(path):
if not os.path.exists(path):
- util.mkdir_dash_p(os.path.dirname(path))
- try:
- os.mkdir(path)
- except OSError:
- if not os.path.exists(path):
- os.mkdir(path)
+ os.makedirs(path)
def stream_extract(stream, path, files=[], decompress=True):
"""Retrieve a stream from Keep and extract it to a local
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list