def test_ordered_dict_reduces(self): if sys.version_info < (2, 7): return d = collections.OrderedDict([('c', 3), ('a', 1), ('b', 2)]) has_reduce, has_reduce_ex = util.has_reduce(d) self.assertTrue(util.is_reducible(d)) self.assertTrue(has_reduce or has_reduce_ex)
def test_ordered_dict_reduces(self): if sys.version_info < (2, 7): return d = collections.OrderedDict() d.update(c=3) d.update(a=1) d.update(b=2) has_reduce, has_reduce_ex = util.has_reduce(d) self.assertTrue(util.is_reducible(d)) self.assertTrue(has_reduce or has_reduce_ex)
def test_ordered_dict_reduces(self): d = collections.OrderedDict([('c', 3), ('a', 1), ('b', 2)]) has_reduce, has_reduce_ex = util.has_reduce(d) self.assertTrue(util.is_reducible(d)) self.assertTrue(has_reduce or has_reduce_ex)
def test_ordered_dict_reduces(): """Ensure that OrderedDict is reduce()-able""" d = collections.OrderedDict([('c', 3), ('a', 1), ('b', 2)]) has_reduce, has_reduce_ex = util.has_reduce(d) assert util.is_reducible(d) assert has_reduce or has_reduce_ex
def test_ordered_dict_reduces(self): d = collections.OrderedDict([('c', 3), ('a', 1), ('b', 2)]) has_reduce, has_reduce_ex = util.has_reduce(d) self.assertTrue(util.is_reducible(d)) self.assertTrue(has_reduce or has_reduce_ex)