[ARVADOS] updated: 67ba19113789346005aa61d4234bc33c8677a85c

Git user git at public.curoverse.com
Tue Apr 18 12:51:54 EDT 2017


Summary of changes:
 sdk/python/tests/test_arv_get.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

       via  67ba19113789346005aa61d4234bc33c8677a85c (commit)
      from  9609f9a5a4776671f571f765a179506d26df56da (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 67ba19113789346005aa61d4234bc33c8677a85c
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Tue Apr 18 13:45:39 2017 -0300

    11502: Use os.path.join instead of formatting path-like strings on tests.

diff --git a/sdk/python/tests/test_arv_get.py b/sdk/python/tests/test_arv_get.py
index afbe634..8be528f 100644
--- a/sdk/python/tests/test_arv_get.py
+++ b/sdk/python/tests/test_arv_get.py
@@ -70,11 +70,11 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
         # Download the entire collection to the temp directory
         r = self.run_get(["{}/".format(self.col_loc), self.tempdir])
         self.assertEqual(0, r)
-        with open("{}/foo.txt".format(self.tempdir), "r") as f:
+        with open(os.path.join(self.tempdir, "foo.txt"), "r") as f:
             self.assertEqual("foo", f.read())
-        with open("{}/bar.txt".format(self.tempdir), "r") as f:
+        with open(os.path.join(self.tempdir, "bar.txt"), "r") as f:
             self.assertEqual("bar", f.read())
-        with open("{}/subdir/baz.txt".format(self.tempdir), "r") as f:
+        with open(os.path.join(self.tempdir, "subdir", "baz.txt"), "r") as f:
             self.assertEqual("baz", f.read())
 
     def test_get_collection_unstripped_manifest(self):
@@ -99,12 +99,12 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
         # Get the collection manifest by UUID
         r = self.run_get(['--strip-manifest', col_loc, self.tempdir])
         self.assertEqual(0, r)
-        with open("{}/{}".format(self.tempdir, col_loc), "r") as f:
+        with open(os.path.join(self.tempdir, col_loc), "r") as f:
             self.assertEqual(col_manifest, f.read())
         # Get the collection manifest by PDH
         r = self.run_get(['--strip-manifest', col_pdh, self.tempdir])
         self.assertEqual(0, r)
-        with open("{}/{}".format(self.tempdir, col_pdh), "r") as f:
+        with open(os.path.join(self.tempdir, col_pdh), "r") as f:
             self.assertEqual(col_manifest, f.read())
 
     def test_invalid_collection(self):
@@ -126,10 +126,10 @@ class ArvadosGetTestCase(run_test_server.TestCaseWithServers):
     def test_preexistent_destination(self):
         # Asking to place a file with the same path as a local one should
         # generate an error and avoid overwrites.
-        with open("{}/foo.txt".format(self.tempdir), "w") as f:
+        with open(os.path.join(self.tempdir, "foo.txt"), "w") as f:
             f.write("another foo")
         r = self.run_get(["{}/foo.txt".format(self.col_loc), self.tempdir])
         self.assertNotEqual(0, r)
-        with open("{}/foo.txt".format(self.tempdir), "r") as f:
+        with open(os.path.join(self.tempdir, "foo.txt"), "r") as f:
             self.assertEqual("another foo", f.read())
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list