2411: Add copyright notices to everything.
[arvados.git] / sdk / python / tests / test_benchmark_collections.py
index d75ad477896defb39eab00035cd9fbe757e49fbf..fc062e791cbf77874d35bddffa21ad1ec70a1d06 100644 (file)
@@ -1,10 +1,15 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+from __future__ import absolute_import
 import arvados
 import sys
 
-import run_test_server
-import arvados_testutil as tutil
-import manifest_examples
-from performance.performance_profiler import profiled
+from . import run_test_server
+from . import arvados_testutil as tutil
+from . import manifest_examples
+from .performance.performance_profiler import profiled
 
 class CollectionBenchmark(run_test_server.TestCaseWithServers,
                           tutil.ArvadosBaseTestCase,
@@ -46,7 +51,7 @@ class CollectionBenchmark(run_test_server.TestCaseWithServers,
         dst = arvados.collection.Collection()
         with tutil.mock_keep_responses('x'*self.TEST_BLOCK_SIZE, 200):
             for name in self.list_recursive(src):
-                with src.open(name) as srcfile, dst.open(name, 'w') as dstfile:
+                with src.open(name, 'rb') as srcfile, dst.open(name, 'wb') as dstfile:
                     dstfile.write(srcfile.read())
             dst.save_new()