[ARVADOS] updated: 27dc00515f48ed69b4d5e26ff64805b8cda4ccd3

git at public.curoverse.com git at public.curoverse.com
Fri Jun 12 10:33:29 EDT 2015


Summary of changes:
 sdk/python/arvados/collection.py     | 9 ++++-----
 sdk/python/tests/test_collections.py | 8 ++++----
 services/fuse/tests/test_mount.py    | 2 +-
 3 files changed, 9 insertions(+), 10 deletions(-)

       via  27dc00515f48ed69b4d5e26ff64805b8cda4ccd3 (commit)
      from  349e1ee218d7e888c6c1bcb07f6537f0bdc85012 (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 27dc00515f48ed69b4d5e26ff64805b8cda4ccd3
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Jun 12 10:33:39 2015 -0400

    3198: Fix tests for change in ~conflict~ format.  Tweak comments.

diff --git a/sdk/python/arvados/collection.py b/sdk/python/arvados/collection.py
index 5dde8f7..70341d8 100644
--- a/sdk/python/arvados/collection.py
+++ b/sdk/python/arvados/collection.py
@@ -644,14 +644,13 @@ class RichCollectionBase(CollectionBase):
             return ArvadosFileWriter(arvfile, mode, num_retries=self.num_retries)
 
     def modified(self):
+        """Determine if the collection has been modified since last commited."""
         return not self.committed()
 
-    def set_unmodified(self):
-        self.set_committed()
-
     @synchronized
     def committed(self):
-        """Test if the collection and all subcollection and files are committed."""
+        """Determine if the collection has been committed to the API server."""
+
         if self._committed is False:
             return False
         for v in self._items.values():
@@ -661,7 +660,7 @@ class RichCollectionBase(CollectionBase):
 
     @synchronized
     def set_committed(self):
-        """Recursively set committed flag."""
+        """Recursively set committed flag to True."""
         self._committed = True
         for k,v in self._items.items():
             v.set_committed()
diff --git a/sdk/python/tests/test_collections.py b/sdk/python/tests/test_collections.py
index 8bf08d0..13fc88d 100644
--- a/sdk/python/tests/test_collections.py
+++ b/sdk/python/tests/test_collections.py
@@ -1017,7 +1017,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
 
         # c1 changed, so c2 mod will go to a conflict file
         c1.apply(d)
-        self.assertRegexpMatches(c1.portable_manifest_text(), r"\. 95ebc3c7b3b9f1d2c40fec14415d3cb8\+5 5348b82a029fd9e971a811ce1f71360b\+43 0:5:count1\.txt 5:10:count1\.txt~conflict-\d\d\d\d-\d\d-\d\d-\d\d:\d\d:\d\d~$")
+        self.assertRegexpMatches(c1.portable_manifest_text(), r"\. 95ebc3c7b3b9f1d2c40fec14415d3cb8\+5 5348b82a029fd9e971a811ce1f71360b\+43 0:5:count1\.txt 5:10:count1\.txt~\d\d\d\d\d\d\d\d-\d\d\d\d\d\d~conflict~$")
 
     def test_conflict_add(self):
         c1 = Collection('. 781e5e245d69b566979b86e28d23f2c7+10 0:10:count2.txt\n')
@@ -1030,7 +1030,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
 
         # c1 added count1.txt, so c2 add will go to a conflict file
         c1.apply(d)
-        self.assertRegexpMatches(c1.portable_manifest_text(), r"\. 95ebc3c7b3b9f1d2c40fec14415d3cb8\+5 5348b82a029fd9e971a811ce1f71360b\+43 0:5:count1\.txt 5:10:count1\.txt~conflict-\d\d\d\d-\d\d-\d\d-\d\d:\d\d:\d\d~$")
+        self.assertRegexpMatches(c1.portable_manifest_text(), r"\. 95ebc3c7b3b9f1d2c40fec14415d3cb8\+5 5348b82a029fd9e971a811ce1f71360b\+43 0:5:count1\.txt 5:10:count1\.txt~\d\d\d\d\d\d\d\d-\d\d\d\d\d\d~conflict~$")
 
     def test_conflict_del(self):
         c1 = Collection('. 781e5e245d69b566979b86e28d23f2c7+10 0:10:count1.txt')
@@ -1041,7 +1041,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
 
         # c1 deleted, so c2 mod will go to a conflict file
         c1.apply(d)
-        self.assertRegexpMatches(c1.portable_manifest_text(), r"\. 5348b82a029fd9e971a811ce1f71360b\+43 0:10:count1\.txt~conflict-\d\d\d\d-\d\d-\d\d-\d\d:\d\d:\d\d~$")
+        self.assertRegexpMatches(c1.portable_manifest_text(), r"\. 5348b82a029fd9e971a811ce1f71360b\+43 0:10:count1\.txt~\d\d\d\d\d\d\d\d-\d\d\d\d\d\d~conflict~$")
 
     def test_notify(self):
         c1 = Collection()
@@ -1144,7 +1144,7 @@ class CollectionCreateUpdateTest(run_test_server.TestCaseWithServers):
         c2.save()
 
         c1.update()
-        self.assertRegexpMatches(c1.manifest_text(), r"\. e65075d550f9b5bf9992fa1d71a131be\+3 7ac66c0f148de9519b8bd264312c4d64\+7\+A[a-f0-9]{40}@[a-f0-9]{8} 0:3:count\.txt 3:7:count\.txt~conflict-\d\d\d\d-\d\d-\d\d-\d\d:\d\d:\d\d~$")
+        self.assertRegexpMatches(c1.manifest_text(), r"\. e65075d550f9b5bf9992fa1d71a131be\+3 7ac66c0f148de9519b8bd264312c4d64\+7\+A[a-f0-9]{40}@[a-f0-9]{8} 0:3:count\.txt 3:7:count\.txt~\d\d\d\d\d\d\d\d-\d\d\d\d\d\d~conflict~$")
 
 
 if __name__ == '__main__':
diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py
index b4f3599..31d4e7a 100644
--- a/services/fuse/tests/test_mount.py
+++ b/services/fuse/tests/test_mount.py
@@ -48,7 +48,7 @@ class MountTestBase(unittest.TestCase):
 
     def tearDown(self):
         self.pool.close()
-        self.pool = None
+        del self.pool
 
         # llfuse.close is buggy, so use fusermount instead.
         #llfuse.close(unmount=True)

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list