From a10eb024872ee454e88f419d267865c6a98ecb9c 2014-01-28 23:34:58 From: Min RK Date: 2014-01-28 23:34:58 Subject: [PATCH] Merge pull request #4909 from juliantaylor/py3-testfix sort dictionary keys before comparison, ordering is not guaranteed --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index ee7fb28..c8bf315 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -655,7 +655,7 @@ def test_user_expression(): r = ip.user_expressions(query) import pprint pprint.pprint(r) - nt.assert_equal(r.keys(), query.keys()) + nt.assert_equal(set(r.keys()), set(query.keys())) a = r['a'] nt.assert_equal(set(['status', 'data', 'metadata']), set(a.keys())) nt.assert_equal(a['status'], 'ok')