[tor-commits] [bridgedb/master] Fix another CI failure due to twisted.trial API changes in Python2.6.

isis at torproject.org isis at torproject.org
Sun Jan 12 06:06:32 UTC 2014


commit 45fee35f74efacd5e4d21f460a06d0af07b431e4
Author: Isis Lovecruft <isis at torproject.org>
Date:   Tue Nov 19 03:49:07 2013 +0000

    Fix another CI failure due to twisted.trial API changes in Python2.6.
---
 lib/bridgedb/test/test_persistentSaveAndLoad.py |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/bridgedb/test/test_persistentSaveAndLoad.py b/lib/bridgedb/test/test_persistentSaveAndLoad.py
index 73d0f34..7919df3 100644
--- a/lib/bridgedb/test/test_persistentSaveAndLoad.py
+++ b/lib/bridgedb/test/test_persistentSaveAndLoad.py
@@ -57,8 +57,10 @@ class StateSaveAndLoadTests(unittest.TestCase):
         self.assertIsInstance(loadedState, persistent.State)
         self.assertNotIdentical(self.state, loadedState)
         self.assertNotEqual(self.state, loadedState)
-        self.assertItemsEqual(self.state.__dict__.keys(),
-                              loadedState.__dict__.keys())
+        # For some reason, twisted.trial.unittest.TestCase in Python2.6
+        # doesn't have an 'assertItemsEqual' attribute...
+        self.assertEqual(self.state.__dict__.keys().sort(),
+                         loadedState.__dict__.keys().sort())
 
     def savedStateAssertions(self, savedStatefile=None):
         self.assertTrue(os.path.isfile(str(self.state.statefile)))





More information about the tor-commits mailing list