def setUp(self):
        from misura.droid import instrument
        from misura import kiln, flex

        file_proxy = filedata.getFileProxy(
            os.path.join(iutils_testing.data_dir, 'test_video.h5'))
        file_proxy.load_conf()

        proxy = file_proxy.conf

        self.measure_info = measureinfo.MeasureInfo(proxy.hsm)
    def setUp(self):
        from misura.droid import instrument
        from misura import kiln, flex

        file_proxy = filedata.getFileProxy(
            os.path.join(iutils_testing.data_dir, 'test_video.h5'))
        file_proxy.load_conf()

        proxy = file_proxy.conf

        self.measure_info = measureinfo.MeasureInfo(proxy.hsm)
 def test_restandard(self):
     """Tests the distribution of scripts"""
     fp = filedata.getFileProxy(nativem4)
     fp.conf.post.distribute_scripts()
     correct = fp.conf.post.sample0['Melting']
     # Set a wrong value
     fp.conf.post.sample0['Melting'] = {
         'point': 0, 'value': 0, 'temp': 0, 'time': 0}
     # Check if it is really set
     self.assertEqual(
         fp.conf.post.sample0['Melting'], {'point': 0, 'value': 0, 'temp': 0, 'time': 0})
     sumTable = fp.test.uid(fp.uid).test.root.summary
     fp.conf.post.characterization(sumTable)
     # Set if the correct value is back
     self.assertEqual(fp.conf.post.sample0['Melting'], correct)
     fp.close()
    def test(self):
        nativem4 = os.path.join(iutils_testing.data_dir, 'test_video.h5')
        fp = filedata.getFileProxy(nativem4)

        decoder = filedata.DataDecoder()
        decoder.reset(fp, '/hsm/sample0/profile')

        self.assertEqual(decoder.ext, 'Profile')

        r = decoder.get_data(0)
        self.assertIn('0', decoder.cached_profiles)

        self.assertFalse(os.path.exists(temp_file))
        r[1].save(temp_file, 'JPG')
        self.assertTrue(os.path.exists(temp_file))

        r = decoder.get_data(1)
        self.assertIn('1', decoder.cached_profiles)

        r = decoder.get_data(2)
        self.assertIn('2', decoder.cached_profiles)

        fp.close()
Esempio n. 5
0
    def test(self):
        nativem4 = os.path.join(iutils_testing.data_dir, 'test_video.h5')
        fp = filedata.getFileProxy(nativem4)

        decoder = filedata.DataDecoder()
        decoder.reset(fp, '/hsm/sample0/profile')

        self.assertEqual(decoder.ext, 'Profile')

        r = decoder.get_data(0)
        self.assertIn('0', decoder.cached_profiles)

        self.assertFalse(os.path.exists(temp_file))
        r[1].save(temp_file, 'JPG')
        self.assertTrue(os.path.exists(temp_file))

        r = decoder.get_data(1)
        self.assertIn('1', decoder.cached_profiles)

        r = decoder.get_data(2)
        self.assertIn('2', decoder.cached_profiles)

        fp.close()
Esempio n. 6
0
 def test_restandard(self):
     """Tests the distribution of scripts"""
     fp = filedata.getFileProxy(nativem4)
     fp.conf.post.distribute_scripts()
     correct = fp.conf.post.sample0['Melting']
     # Set a wrong value
     fp.conf.post.sample0['Melting'] = {
         'point': 0,
         'value': 0,
         'temp': 0,
         'time': 0
     }
     # Check if it is really set
     self.assertEqual(fp.conf.post.sample0['Melting'], {
         'point': 0,
         'value': 0,
         'temp': 0,
         'time': 0
     })
     sumTable = fp.test.uid(fp.uid).test.root.summary
     fp.conf.post.characterization(sumTable)
     # Set if the correct value is back
     self.assertEqual(fp.conf.post.sample0['Melting'], correct)
     fp.close()
 def setUpClass(self):
     file_proxy = filedata.getFileProxy(nativem4)
     file_proxy.load_conf()
     file_proxy.close()
     self.server = file_proxy.conf
Esempio n. 8
0
 def setUp(self):
     self.file_proxy = filedata.getFileProxy(self.path)