Beispiel #1
0
 def setUp(self):
     """
     Open the hdf5 file
     """
     self.hdf5 = h5py.File(self.TABLE_FILE, 'r')
     self.amp_table = AmplificationTable(self.hdf5["Amplification"],
                                         self.hdf5["Mw"][:],
                                         self.hdf5["Distances"][:])
Beispiel #2
0
 def test_unsupported_parameter(self):
     """
     Tests instantiation with a bad input
     """
     with self.assertRaises(ValueError) as ve:
         AmplificationTable(self.hdf5["Amplification"], None, None)
     self.assertEqual(str(ve.exception),
                      "Amplification parameter Bad Value not recognised!")