Exemple #1
0
    def test_load(self):
        global test_file
        matfile = os.path.join('tmp', test_file[:-4]+'1.mat')
        matfile2 = os.path.join('tmp', test_file[:-4]+'2.mat')
        
        daq = Daq()
        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),
                                    '',matfile2)
        old_daqmat = sio.loadmat(matfile2)
        self.__assert_daqmats_equal(old_daqmat, daqmat)
Exemple #2
0
    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)