##// END OF EJS Templates
use sets when testing user expressions...
MinRK -
Show More
@@ -596,12 +596,12 b' def test_user_variables():'
596 ip.display_formatter.active_types = ip.display_formatter.format_types
596 ip.display_formatter.active_types = ip.display_formatter.format_types
597
597
598 ip.user_ns['dummy'] = d = DummyRepr()
598 ip.user_ns['dummy'] = d = DummyRepr()
599 keys = ['dummy', 'doesnotexist']
599 keys = set(['dummy', 'doesnotexist'])
600 r = ip.user_variables(keys)
600 r = ip.user_variables(keys)
601
601
602 nt.assert_equal(keys, list(r.keys()))
602 nt.assert_equal(keys, set(r.keys()))
603 dummy = r['dummy']
603 dummy = r['dummy']
604 nt.assert_equal(['status', 'data', 'metadata'], list(dummy.keys()))
604 nt.assert_equal(set(['status', 'data', 'metadata']), set(dummy.keys()))
605 nt.assert_equal(dummy['status'], 'ok')
605 nt.assert_equal(dummy['status'], 'ok')
606 data = dummy['data']
606 data = dummy['data']
607 metadata = dummy['metadata']
607 metadata = dummy['metadata']
@@ -629,7 +629,7 b' def test_user_expression():'
629 pprint.pprint(r)
629 pprint.pprint(r)
630 nt.assert_equal(r.keys(), query.keys())
630 nt.assert_equal(r.keys(), query.keys())
631 a = r['a']
631 a = r['a']
632 nt.assert_equal(['status', 'data', 'metadata'], list(a.keys()))
632 nt.assert_equal(set(['status', 'data', 'metadata']), set(a.keys()))
633 nt.assert_equal(a['status'], 'ok')
633 nt.assert_equal(a['status'], 'ok')
634 data = a['data']
634 data = a['data']
635 metadata = a['metadata']
635 metadata = a['metadata']
General Comments 0
You need to be logged in to leave comments. Login now