From 2649f81cc23cf9c6f3c597adf2807e60ee6fd9ff Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Fri, 1 Aug 2014 21:24:15 -0400 Subject: Ensure Extension.getConfigInfo Test always passes Dicts don't preserve order but still will be equal while lists of tuples always preserve order. When we use a dict to create a list of tuples, the results are unpredictable - especially for a equality test. so we need to compare dicts, not lists. Related to #325 --- tests/test_extensions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_extensions.py') diff --git a/tests/test_extensions.py b/tests/test_extensions.py index b98295c..b42d65d 100644 --- a/tests/test_extensions.py +++ b/tests/test_extensions.py @@ -35,8 +35,9 @@ class TestExtensionClass(unittest.TestCase): self.assertEqual(self.ext.getConfigs(), {'foo': 'bar', 'bar': 'baz'}) def testGetConfigInfo(self): - self.assertEqual(self.ext.getConfigInfo(), [('foo', 'Description of foo'), - ('bar', 'Description of bar')]) + self.assertEqual(dict(self.ext.getConfigInfo()), + dict([('foo', 'Description of foo'), + ('bar', 'Description of bar')]) def testSetConfig(self): self.ext.setConfig('foo', 'baz') -- cgit v1.2.3