[arvados] updated: 2.1.0-3079-g032ecb480

git repository hosting git at public.arvados.org
Mon Nov 28 20:27:55 UTC 2022


Summary of changes:
 sdk/python/tests/test_collections.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

       via  032ecb480134f6138346865fba7732a836b809c6 (commit)
      from  2b7d05cdf4e054024607b859bd6fb41e04855bfa (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 032ecb480134f6138346865fba7732a836b809c6
Author: Brett Smith <brett.smith at curii.com>
Date:   Mon Nov 28 15:25:03 2022 -0500

    Fix manifest comparisons in new collection tests
    
    The previous version of these tests was comparing bound method objects
    directly, rather than comparing the manifest texts returned by calling
    them. Apparently in some setups this comparison returns True, but on my
    development box it returns False, causing test failures. We haven't
    fully diagnosed what causes the difference, but it seems clear enough
    that comparing the method objects isn't the intent of these tests, but
    rather they should compare the returned manifests. This commit updates
    them to do so. No issue #.
    
    Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith at curii.com>

diff --git a/sdk/python/tests/test_collections.py b/sdk/python/tests/test_collections.py
index b4849c21f..b3df88034 100644
--- a/sdk/python/tests/test_collections.py
+++ b/sdk/python/tests/test_collections.py
@@ -896,7 +896,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
         c1.save_new()
         loc = c1.manifest_locator()
         c2 = Collection(loc)
-        self.assertEqual(c1.manifest_text, c2.manifest_text)
+        self.assertEqual(c1.manifest_text(), c2.manifest_text())
         self.assertEqual(c1.replication_desired, c2.replication_desired)
 
     def test_replication_desired_not_loaded_if_provided(self):
@@ -905,7 +905,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
         c1.save_new()
         loc = c1.manifest_locator()
         c2 = Collection(loc, replication_desired=2)
-        self.assertEqual(c1.manifest_text, c2.manifest_text)
+        self.assertEqual(c1.manifest_text(), c2.manifest_text())
         self.assertNotEqual(c1.replication_desired, c2.replication_desired)
 
     def test_storage_classes_desired_kept_on_load(self):
@@ -914,7 +914,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
         c1.save_new()
         loc = c1.manifest_locator()
         c2 = Collection(loc)
-        self.assertEqual(c1.manifest_text, c2.manifest_text)
+        self.assertEqual(c1.manifest_text(), c2.manifest_text())
         self.assertEqual(c1.storage_classes_desired(), c2.storage_classes_desired())
 
     def test_storage_classes_change_after_save(self):
@@ -927,7 +927,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
         c2.save(storage_classes=['highIO'])
         self.assertEqual(['highIO'], c2.storage_classes_desired())
         c3 = Collection(loc)
-        self.assertEqual(c1.manifest_text, c3.manifest_text)
+        self.assertEqual(c1.manifest_text(), c3.manifest_text())
         self.assertEqual(['highIO'], c3.storage_classes_desired())
 
     def test_storage_classes_desired_not_loaded_if_provided(self):
@@ -936,7 +936,7 @@ class NewCollectionTestCase(unittest.TestCase, CollectionTestMixin):
         c1.save_new()
         loc = c1.manifest_locator()
         c2 = Collection(loc, storage_classes_desired=['default'])
-        self.assertEqual(c1.manifest_text, c2.manifest_text)
+        self.assertEqual(c1.manifest_text(), c2.manifest_text())
         self.assertNotEqual(c1.storage_classes_desired(), c2.storage_classes_desired())
 
     def test_init_manifest(self):

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list