Beispiel #1
0
 def test_convert_job_footer(self):
     """Tests for maus_cpp.converter.X_repr() from MAUS.JobFooter"""
     maus_jf = make_test_job_footer()
     self.assertRaises(ValueError, converter.data_repr, (maus_jf,))
     json_dict = converter.json_repr(maus_jf)
     self.assertEqual(json_dict["maus_event_type"], "JobFooter")
     converter.job_footer_repr(json_dict)
     converter.string_repr(maus_jf)
Beispiel #2
0
 def test_convert_job_header(self):
     """Tests for maus_cpp.converter.X_repr() from MAUS.JobHeader"""
     maus_jh = make_test_job_header()
     self.assertRaises(ValueError, converter.data_repr, (maus_jh,))
     json_dict = converter.json_repr(maus_jh)
     self.assertEqual(json_dict["maus_version"], "version")
     converter.job_header_repr(json_dict)
     converter.string_repr(maus_jh)
Beispiel #3
0
 def test_convert_run_header(self):
     """Tests for maus_cpp.converter.X_repr() from MAUS.RunHeader"""
     maus_rh = make_test_run_header()
     self.assertRaises(ValueError, converter.data_repr, (maus_rh,))
     json_dict = converter.json_repr(maus_rh)
     self.assertEqual(json_dict["maus_event_type"], "RunHeader")
     converter.run_header_repr(json_dict)
     converter.string_repr(maus_rh)
Beispiel #4
0
 def test_convert_data(self):
     """Tests for maus_cpp.converter.X_repr() to/from MAUS.Data"""
     maus_data = make_test_data()
     self.assertRaises(ValueError, converter.json_repr, (maus_data, ""))
     json_dict = converter.json_repr(maus_data)
     json_dict = converter.json_repr(maus_data)
     converter.json_repr(json_dict)
     converter.json_repr(json_dict)
     self.assertEqual(json_dict["spill_number"], 999)
     converter.data_repr(json_dict)
     converter.string_repr(maus_data)