def test_pairs(self): r = _.pairs({"one": 1, "two": 2}) self.assertEqual(sorted(r), [["one", 1], ["two", 2]], 'can convert an object into pairs')
def test_pairs(self): r = _.pairs({"one": 1, "two": 2}) # Python alphabetically orders the keys automatically self.assertEqual(r, [["two", 2], ["one", 1]], 'can convert an object into pairs')