Esempio n. 1
0
 def serialise_to_dict(self, request):
     qpt_ph_modes = get_qpt_ph_modes(request.param)
     # Convert to dict, then back to object to test
     qpt_ph_modes_dict = qpt_ph_modes.to_dict()
     qpt_ph_modes_from_dict = QpointPhononModes.from_dict(qpt_ph_modes_dict)
     return qpt_ph_modes, qpt_ph_modes_from_dict
Esempio n. 2
0
 def create_from_dict(self, request):
     material = request.param
     expected_qpt_ph_modes = get_expected_qpt_ph_modes(material)
     qpt_ph_modes = QpointPhononModes.from_dict(
         expected_qpt_ph_modes.to_dict())
     return qpt_ph_modes, expected_qpt_ph_modes