aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWaylan Limberg <waylan.limberg@icloud.com>2014-08-01 21:24:15 -0400
committerWaylan Limberg <waylan.limberg@icloud.com>2014-08-01 21:24:15 -0400
commit2649f81cc23cf9c6f3c597adf2807e60ee6fd9ff (patch)
treee238f3357a63d07d70157666e56f36476ae5d908 /tests
parentbf4a2c69349320666b39d049bf7cef782334b9b4 (diff)
downloadmarkdown-2649f81cc23cf9c6f3c597adf2807e60ee6fd9ff.tar.gz
markdown-2649f81cc23cf9c6f3c597adf2807e60ee6fd9ff.tar.bz2
markdown-2649f81cc23cf9c6f3c597adf2807e60ee6fd9ff.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/test_extensions.py5
1 files changed, 3 insertions, 2 deletions
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')