[ARVADOS] updated: 04f5f75659e963f02441a566afcc6d22683d0485

git at public.curoverse.com git at public.curoverse.com
Tue Jan 6 13:17:59 EST 2015


Summary of changes:
 sdk/go/keepclient/keepclient.go  |  4 +--
 sdk/go/keepclient/support.go     | 64 +++++++++++++++++++++++++++++++++++-----
 sdk/python/tests/test_arvfile.py | 59 +++++++++++++++++-------------------
 3 files changed, 86 insertions(+), 41 deletions(-)

       via  04f5f75659e963f02441a566afcc6d22683d0485 (commit)
       via  86f94e641462ddd78a454fc0a0cdc9dd4c4d9bef (commit)
       via  9013faf477b5862cb915f1d80148daffa795cc89 (commit)
       via  51698227fada4c2236de5aa85a4c42bda00c8b94 (commit)
       via  6e307516327390389ab265560cfb0693a4582210 (commit)
      from  0e9443678fc7fd4862b76a10184dc7357a75155d (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 04f5f75659e963f02441a566afcc6d22683d0485
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Jan 6 13:19:28 2015 -0500

    4823: Working on porting more StreamReader tests to ArvadosFile.

diff --git a/sdk/python/tests/test_arvfile.py b/sdk/python/tests/test_arvfile.py
index 91cfc79..9c561da 100644
--- a/sdk/python/tests/test_arvfile.py
+++ b/sdk/python/tests/test_arvfile.py
@@ -388,45 +388,40 @@ class ArvadosFileReaderTestCase(StreamFileReaderTestCase):
         sfile.read(5)
         self.assertEqual(3, sfile.tell())
 
-# class StreamReaderTestCase(unittest.TestCase, StreamRetryTestMixin):
-#     def reader_for(self, coll_name, **kwargs):
-#         return StreamReader(self.manifest_for(coll_name).split(),
-#                             self.keep_client(), **kwargs)
 
-#     def read_for_test(self, reader, byte_count, **kwargs):
-#         return reader.readfrom(0, byte_count, **kwargs)
-
-#     def test_manifest_text_without_keep_client(self):
-#         mtext = self.manifest_for('multilevel_collection_1')
-#         for line in mtext.rstrip('\n').split('\n'):
-#             reader = StreamReader(line.split())
-#             self.assertEqual(line + '\n', reader.manifest_text())
-
-
-# class StreamFileReadTestCase(unittest.TestCase, StreamRetryTestMixin):
-#     def reader_for(self, coll_name, **kwargs):
-#         return StreamReader(self.manifest_for(coll_name).split(),
-#                             self.keep_client(), **kwargs).all_files()[0]
+class ArvadosFileReadTestCase(unittest.TestCase, StreamRetryTestMixin):
+    def reader_for(self, coll_name, **kwargs):
+        segments = []
+        n = 0
+        for d in self.manifest_for(coll_name).split():
+            k = KeepLocator(loc)
+            segments.append(Range(d, n, k.size))
+            n += k.size
+        af = ArvadosFile(Collection(keep_client=self.keep_client()),
+                         stream=self.manifest_for(coll_name).split(),
+                         segments=segments,
+                         **kwargs)
+        return ArvadosFileReader(af, "test")
 
-#     def read_for_test(self, reader, byte_count, **kwargs):
-#         return reader.read(byte_count, **kwargs)
+    def read_for_test(self, reader, byte_count, **kwargs):
+        return reader.read(byte_count, **kwargs)
 
 
-# class StreamFileReadFromTestCase(StreamFileReadTestCase):
-#     def read_for_test(self, reader, byte_count, **kwargs):
-#         return reader.readfrom(0, byte_count, **kwargs)
+class ArvadosFileReadFromTestCase(ArvadosFileReadTestCase):
+    def read_for_test(self, reader, byte_count, **kwargs):
+        return reader.readfrom(0, byte_count, **kwargs)
 
 
-# class StreamFileReadAllTestCase(StreamFileReadTestCase):
-#     def read_for_test(self, reader, byte_count, **kwargs):
-#         return ''.join(reader.readall(**kwargs))
+class ArvadosFileReadAllTestCase(ArvadosFileReadTestCase):
+    def read_for_test(self, reader, byte_count, **kwargs):
+        return ''.join(reader.readall(**kwargs))
 
 
-# class StreamFileReadAllDecompressedTestCase(StreamFileReadTestCase):
-#     def read_for_test(self, reader, byte_count, **kwargs):
-#         return ''.join(reader.readall_decompressed(**kwargs))
+class ArvadosFileReadAllDecompressedTestCase(ArvadosFileReadTestCase):
+    def read_for_test(self, reader, byte_count, **kwargs):
+        return ''.join(reader.readall_decompressed(**kwargs))
 
 
-# class StreamFileReadlinesTestCase(StreamFileReadTestCase):
-#     def read_for_test(self, reader, byte_count, **kwargs):
-#         return ''.join(reader.readlines(**kwargs))
+class ArvadosFileReadlinesTestCase(ArvadosFileReadTestCase):
+    def read_for_test(self, reader, byte_count, **kwargs):
+        return ''.join(reader.readlines(**kwargs))

commit 86f94e641462ddd78a454fc0a0cdc9dd4c4d9bef
Merge: 0e94436 9013faf
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Jan 6 11:32:23 2015 -0500

    Merge branch 'master' into 4823-python-sdk-writable-collection-api


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list