예제 #1
0
    def test1(self):
        global test_file
        hdf5file = test_file[:-4] + '.hdf5'
        hdf5file = os.path.join('data', hdf5file)

        rs = ['SCC_LogStreams']

        daq = Daq()
        daq.read_hd5(hdf5file)
        ds = daq.match_keys('*logstream*')

        self.assertEqual(''.join(ds), ''.join(rs))
예제 #2
0
    def test1(self):
        global test_file
        hdf5file = test_file[:-4]+'.hdf5'
        hdf5file = os.path.join('data', hdf5file)

        rs = ['SCC_LogStreams']
        
        daq = Daq()
        daq.read_hd5(hdf5file)
        ds = daq.match_keys('*logstream*')
        
        self.assertEqual(''.join(ds), ''.join(rs))
예제 #3
0
    def test0(self):
        global test_file
        hdf5file = test_file[:-4] + '.hdf5'
        hdf5file = os.path.join('data', hdf5file)

        rs = [
            u'VDS_Veh_Dist', u'SCC_OwnVeh_PathDist', u'SCC_OwnVehToLeadObjDist'
        ]
        daq = Daq()
        daq.read_hd5(hdf5file)
        ds = daq.match_keys('*veh*dist*')

        self.assertEqual(''.join(ds), ''.join(rs))
예제 #4
0
    def test0(self):
        global test_file
        hdf5file = test_file[:-4]+'.hdf5'
        hdf5file = os.path.join('data', hdf5file)

        rs = [u'VDS_Veh_Dist',
              u'SCC_OwnVeh_PathDist',
              u'SCC_OwnVehToLeadObjDist']
        daq = Daq()
        daq.read_hd5(hdf5file)
        ds = daq.match_keys('*veh*dist*')
        
        self.assertEqual(''.join(ds), ''.join(rs))
예제 #5
0
    def test0(self):
        daq = Daq()

        daq.etc['a'] = 1
        daq.etc['b'] = [1, 3]
        daq.etc['c'] = "this is a string"
        daq.etc['d'] = findex(666)
        daq.etc['d'] = {1: fslice(100, 200), 2: fslice(200, 300)}
        daq.write_hd5('./tmp/etctest.hdf5')

        daq2 = Daq()
        daq2.read_hd5('./tmp/etctest.hdf5')

        for k in daq.etc:
            self.assertTrue(k in daq2.etc)
            self.assertEqual(daq.etc[k], daq2.etc[k])
예제 #6
0
 def test0(self):
     daq = Daq()
     
     daq.etc['a'] = 1
     daq.etc['b'] = [1,3]        
     daq.etc['c'] = "this is a string"
     daq.etc['d'] = findex(666)
     daq.etc['d'] = {1: fslice(100, 200),
                     2: fslice(200, 300)}
     daq.write_hd5('./tmp/etctest.hdf5')
     
     daq2 = Daq()
     daq2.read_hd5('./tmp/etctest.hdf5')
     
     for k in daq.etc:
         self.assertTrue(k in daq2.etc)
         self.assertEqual(daq.etc[k], daq2.etc[k])