Ejemplo n.º 1
0
        def func(nucs, i):
            # deserialize from standard output
            nucs.fispact_deserialize(self.filerecord31, i)
            self.assertor31.assert_timestep(nucs, i)

            # serialize to JSON
            j = nucs.json_serialize()

            # reset object
            newnucs = pp.Nuclides()
            self.assertor31.assert_defaults(newnucs)

            # deserialize JSON and compare to original
            newnucs.json_deserialize(j)
            self.assertor31.assert_timestep(newnucs, i)
Ejemplo n.º 2
0
    def _wrapper(self, func):
        nucs = pp.Nuclides()
        self.assertor.assert_defaults(nucs)

        for i in range(-100, 100):
            func(nucs, i)