def test_lconf_structure_classes13_expect_failure(): """ Tests: test_lconf_structure_classes13_expect_failure """ print('::: TEST: test_lconf_structure_classes13_expect_failure()') dumps_result = pickle_dumps([('key', 'value'), ('key1', 'value1')], protocol=P_HIGHEST_PROTOCOL) obj_from_pickle = Root.frompickle(dumps_result)
def test_lconf_structure_classes12(): """ Tests: test_lconf_structure_classes12 """ print('::: TEST: test_lconf_structure_classes12()') obj_ = Root([ ('key1', 'value1'), ('key2', 'value2', None, 'NOT-DEFINED'), ('key3', '', None, 'NOT-DEFINED'), ]) obj_.set_class__dict__item('mydata', 'new value') dumps_result = pickle_dumps(obj_, protocol=P_HIGHEST_PROTOCOL) obj_from_pickle = Root.frompickle(dumps_result) eq_(obj_.mydata, 'new value', msg=None) eq_(obj_.key_order, ['key1', 'key2', 'key3'], msg=None) eq_(obj_.key_empty_replacementvalue, { 'key3': 'NOT-DEFINED', 'key2': 'NOT-DEFINED' }, msg=None) eq_(obj_.mydata, obj_from_pickle.mydata, msg=None) eq_(obj_.key_order, obj_from_pickle.key_order, msg=None) eq_(obj_.key_empty_replacementvalue, obj_from_pickle.key_empty_replacementvalue, msg=None)
def test_lconf_structure_classes13_expect_failure(): """ Tests: test_lconf_structure_classes13_expect_failure """ print('::: TEST: test_lconf_structure_classes13_expect_failure()') dumps_result = pickle_dumps([('key', 'value'), ('key1', 'value1')], protocol=P_HIGHEST_PROTOCOL) obj_from_pickle = Root.frompickle(dumps_result)
def test_lconf_structure_classes12(): """ Tests: test_lconf_structure_classes12 """ print('::: TEST: test_lconf_structure_classes12()') obj_ = Root([ ('key1', 'value1'), ('key2', 'value2', None, 'NOT-DEFINED'), ('key3', '', None, 'NOT-DEFINED'), ]) obj_.set_class__dict__item('mydata', 'new value') dumps_result = pickle_dumps(obj_, protocol=P_HIGHEST_PROTOCOL) obj_from_pickle = Root.frompickle(dumps_result) eq_(obj_.mydata, 'new value', msg=None) eq_(obj_.key_order, ['key1', 'key2', 'key3'], msg=None) eq_(obj_.key_empty_replacementvalue, {'key3': 'NOT-DEFINED', 'key2': 'NOT-DEFINED'}, msg=None) eq_(obj_.mydata, obj_from_pickle.mydata, msg=None) eq_(obj_.key_order, obj_from_pickle.key_order, msg=None) eq_(obj_.key_empty_replacementvalue, obj_from_pickle.key_empty_replacementvalue, msg=None)