From d84134e7073636517769365d8393f0ca17d9a656 2014-01-28 23:35:14 From: MinRK Date: 2014-01-28 23:35:14 Subject: [PATCH] Backport PR #4909: sort dictionary keys before comparison, ordering is not guaranteed failed for me on 1.x with nose.proxy.AssertionError: AssertionError: Lists differ: ['a', 'b'] != ['b', 'a'] (2to3 wraps a list around it) --- diff --git a/IPython/core/tests/test_interactiveshell.py b/IPython/core/tests/test_interactiveshell.py index 954f60c..5176bd1 100644 --- a/IPython/core/tests/test_interactiveshell.py +++ b/IPython/core/tests/test_interactiveshell.py @@ -630,7 +630,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')