9d9082eb1b1c4d2f31f9b135ad0b08ef46f53fc6,pyemma/_base/serialization/tests/test_serialization.py,TestSerialisation,test_updated_class_v1_to_v3,#TestSerialisation#,171

Before Change


    def test_updated_class_v1_to_v3(self):
        global test_cls_v1
        old_class = test_cls_v1
        try:
            inst = test_cls_v1()
            inst.save(self.fn)

            test_cls_v1 = test_cls_v3

            inst_restored = pyemma.load(self.fn)

            self.assertIsInstance(inst_restored, test_cls_v3)
            self.assertEqual(inst_restored.z, 23)
            np.testing.assert_equal(inst_restored.c, inst.a)
            self.assertFalse(hasattr(inst_restored, "y"))
        finally:
            test_cls_v1 = old_class

    def test_validate_map_order(self):
        interpolation_map = {3: [("set", "x", None)], 0: [("rm", "x")]}
        s = SerializableMixIn()
        s._serialize_interpolation_map = interpolation_map

After Change


        inst = test_cls_v1()
        inst.save(self.fn)

        patch_old_location(test_cls_v1, test_cls_v3)

        inst_restored = pyemma.load(self.fn)

        self.assertIsInstance(inst_restored, test_cls_v3)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: markovmodel/PyEMMA
Commit Name: 9d9082eb1b1c4d2f31f9b135ad0b08ef46f53fc6
Time: 2017-04-13
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/tests/test_serialization.py
Class Name: TestSerialisation
Method Name: test_updated_class_v1_to_v3


Project Name: markovmodel/PyEMMA
Commit Name: 9d9082eb1b1c4d2f31f9b135ad0b08ef46f53fc6
Time: 2017-04-13
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/tests/test_serialization.py
Class Name: TestSerialisation
Method Name: test_renamed_class


Project Name: markovmodel/PyEMMA
Commit Name: 9d9082eb1b1c4d2f31f9b135ad0b08ef46f53fc6
Time: 2017-04-13
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/serialization/tests/test_serialization.py
Class Name: TestSerialisation
Method Name: test_updated_class_v2_to_v3