def test_load_with_elemlist(self): global test_file daq = Daq() daq.load_elemlist_fromfile('elemList2.txt') # something about nose makes catching the warnings not work with warnings.catch_warnings(record=True) as w: daq.read(os.path.join('data', test_file)) old_daq = old_convert_daq.read_file(os.path.join('data', test_file), elemfile='elemList2.txt') self.__assert_old_daq_equals_daq(old_daq, daq)
def test_readwrite_with_elemlist_f0fend(self): global test_file hdf5file = os.path.join('tmp', test_file[:-4]+'_4.hdf5') daq = Daq() daq.load_elemlist_fromfile('elemList2.txt') with warnings.catch_warnings(record=True) as w: daq.read(os.path.join('data', test_file)) daq.write_hd5(hdf5file) daq2 = Daq() daq2.read_hd5(hdf5file, fend=8000) self.assertEqual(daq2.frame.frame[-1], 8000)
def test_readwrite_with_elemlist(self): global test_file hdf5file = os.path.join('tmp', test_file[:-4]+'_2.hdf5') daq = Daq() daq.load_elemlist_fromfile('elemList2.txt') with warnings.catch_warnings(record=True) as w: daq.read(os.path.join('data', test_file)) daq.write_hd5(hdf5file) daq2 = Daq() daq2.read_hd5(hdf5file) assert_Daqs_equal(self, daq, daq2)
def test_load_with_elemlist(self): global test_file matfile = os.path.join('tmp', test_file[:-4]+'11.mat') matfile2 = os.path.join('tmp', test_file[:-4]+'22.mat') daq = Daq() daq.load_elemlist_fromfile('elemList2.txt') with warnings.catch_warnings(record=True) as w: daq.read(os.path.join('data', test_file), process_dynobjs=False) daq.write_mat(matfile) del daq daqmat = sio.loadmat(matfile) old_convert_daq.convert_daq(os.path.join('data', test_file), 'elemList2.txt',matfile2) old_daqmat = sio.loadmat(matfile2) self.__assert_daqmats_equal(old_daqmat, daqmat)